mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
waybar: systemd cleanup
No reason to allow nullable and it was inconsistently applied
This commit is contained in:
parent
e43c6bcb10
commit
cfd7df8a21
2 changed files with 11 additions and 13 deletions
|
|
@ -221,7 +221,7 @@ in
|
||||||
systemd.enable = mkEnableOption "Waybar systemd integration";
|
systemd.enable = mkEnableOption "Waybar systemd integration";
|
||||||
|
|
||||||
systemd.target = mkOption {
|
systemd.target = mkOption {
|
||||||
type = nullOr str;
|
type = str;
|
||||||
default = config.wayland.systemd.target;
|
default = config.wayland.systemd.target;
|
||||||
defaultText = literalExpression "config.wayland.systemd.target";
|
defaultText = literalExpression "config.wayland.systemd.target";
|
||||||
example = "sway-session.target";
|
example = "sway-session.target";
|
||||||
|
|
@ -354,20 +354,18 @@ in
|
||||||
++ optional (cfg.style != null) "${config.xdg.configFile."waybar/style.css".source}";
|
++ optional (cfg.style != null) "${config.xdg.configFile."waybar/style.css".source}";
|
||||||
};
|
};
|
||||||
|
|
||||||
Service =
|
Service = {
|
||||||
{
|
Environment = optional cfg.systemd.enableInspect "GTK_DEBUG=interactive";
|
||||||
ExecStart = "${cfg.package}/bin/waybar";
|
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
|
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
|
||||||
Restart = "on-failure";
|
ExecStart = "${cfg.package}/bin/waybar";
|
||||||
KillMode = "mixed";
|
KillMode = "mixed";
|
||||||
}
|
Restart = "on-failure";
|
||||||
// optionalAttrs cfg.systemd.enableInspect {
|
|
||||||
Environment = [ "GTK_DEBUG=interactive" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Install.WantedBy = [
|
Install.WantedBy = [
|
||||||
|
cfg.systemd.target
|
||||||
"tray.target"
|
"tray.target"
|
||||||
] ++ lib.optional (cfg.systemd.target != null) cfg.systemd.target;
|
];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=tray.target
|
|
||||||
WantedBy=sway-session.target
|
WantedBy=sway-session.target
|
||||||
|
WantedBy=tray.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecReload=/nix/store/00000000000000000000000000000000-coreutils/bin/kill -SIGUSR2 $MAINPID
|
ExecReload=/nix/store/00000000000000000000000000000000-coreutils/bin/kill -SIGUSR2 $MAINPID
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue