1
0
Fork 0
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:
CnTeng 2025-03-14 13:19:29 +08:00 committed by Austin Horstman
parent e30c6a41bc
commit 4e12151c9e

View file

@ -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";
};
};
};
}