mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-20 23:30:07 +00:00
megasync: add option to enable wayland
This commit is contained in:
parent
e30c6a41bc
commit
4e12151c9e
1 changed files with 12 additions and 1 deletions
|
@ -8,6 +8,13 @@ in {
|
|||
enable = lib.mkEnableOption "Megasync client";
|
||||
|
||||
package = lib.mkPackageOption pkgs "megasync" { };
|
||||
|
||||
forceWayland = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Force Megasync to run on wayland";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -28,7 +35,11 @@ in {
|
|||
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
|
||||
Service = { ExecStart = "${cfg.package}/bin/megasync"; };
|
||||
Service = {
|
||||
Environment =
|
||||
lib.optionals cfg.forceWayland [ "DO_NOT_UNSET_XDG_SESSION_TYPE=1" ];
|
||||
ExecStart = lib.getExe' cfg.package "megasync";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue