mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 18:59:47 +01:00
swayidle: allow wayland targets other than sway-session.target (#3202)
Allow another Wayland targets, as river-session.target or hyprland-session.target, to use swayidle.service which is hard-coded to sway-session.target.
This commit is contained in:
parent
140aaed3df
commit
583a99f016
1 changed files with 10 additions and 1 deletions
|
@ -96,6 +96,15 @@ in {
|
|||
default = [ ];
|
||||
description = "Extra arguments to pass to swayidle.";
|
||||
};
|
||||
|
||||
systemdTarget = mkOption {
|
||||
type = types.str;
|
||||
default = "sway-session.target";
|
||||
description = ''
|
||||
Systemd target to bind to.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -114,7 +123,7 @@ in {
|
|||
"${cfg.package}/bin/swayidle -w ${concatStringsSep " " args}";
|
||||
};
|
||||
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
Install = { WantedBy = [ cfg.systemdTarget ]; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue