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.target = mkOption {
|
||||
type = nullOr str;
|
||||
type = str;
|
||||
default = config.wayland.systemd.target;
|
||||
defaultText = literalExpression "config.wayland.systemd.target";
|
||||
example = "sway-session.target";
|
||||
|
|
@ -354,20 +354,18 @@ in
|
|||
++ optional (cfg.style != null) "${config.xdg.configFile."waybar/style.css".source}";
|
||||
};
|
||||
|
||||
Service =
|
||||
{
|
||||
ExecStart = "${cfg.package}/bin/waybar";
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
|
||||
Restart = "on-failure";
|
||||
KillMode = "mixed";
|
||||
}
|
||||
// optionalAttrs cfg.systemd.enableInspect {
|
||||
Environment = [ "GTK_DEBUG=interactive" ];
|
||||
};
|
||||
Service = {
|
||||
Environment = optional cfg.systemd.enableInspect "GTK_DEBUG=interactive";
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
|
||||
ExecStart = "${cfg.package}/bin/waybar";
|
||||
KillMode = "mixed";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
Install.WantedBy = [
|
||||
cfg.systemd.target
|
||||
"tray.target"
|
||||
] ++ lib.optional (cfg.systemd.target != null) cfg.systemd.target;
|
||||
];
|
||||
};
|
||||
})
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[Install]
|
||||
WantedBy=tray.target
|
||||
WantedBy=sway-session.target
|
||||
WantedBy=tray.target
|
||||
|
||||
[Service]
|
||||
ExecReload=/nix/store/00000000000000000000000000000000-coreutils/bin/kill -SIGUSR2 $MAINPID
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue