mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
swaync: allow systemd target to be changed
This commit is contained in:
parent
a4353cc43d
commit
61837c3f42
2 changed files with 10 additions and 7 deletions
|
@ -73,6 +73,15 @@ in {
|
||||||
for the documentation.
|
for the documentation.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemdTarget = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "graphical-session.target";
|
||||||
|
example = "sway-session.target";
|
||||||
|
description = ''
|
||||||
|
Systemd target to bind to.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
@ -95,9 +104,6 @@ in {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Swaync notification daemon";
|
Description = "Swaync notification daemon";
|
||||||
Documentation = "https://github.com/ErikReider/SwayNotificationCenter";
|
Documentation = "https://github.com/ErikReider/SwayNotificationCenter";
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
After = [ "graphical-session-pre.target" ];
|
|
||||||
ConditionEnvironment = "WAYLAND_DISPLAY";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
|
@ -107,7 +113,7 @@ in {
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
|
|
||||||
Install.WantedBy = [ "graphical-session.target" ];
|
Install.WantedBy = [ cfg.systemdTarget ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,11 +24,8 @@
|
||||||
Type=dbus
|
Type=dbus
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
After=graphical-session-pre.target
|
|
||||||
ConditionEnvironment=WAYLAND_DISPLAY
|
|
||||||
Description=Swaync notification daemon
|
Description=Swaync notification daemon
|
||||||
Documentation=https://github.com/ErikReider/SwayNotificationCenter
|
Documentation=https://github.com/ErikReider/SwayNotificationCenter
|
||||||
PartOf=graphical-session.target
|
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue