1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2025-01-30 12:55:02 +01:00

waybar: allow setting systemd.target to null (#6241)

This allows making the systemd user unit appear without it autostarting,
which is useful if you want to start it manually from a specific display
manager config only.
This commit is contained in:
Florian Klink 2025-01-30 01:16:15 +02:00 committed by GitHub
parent 6fbbfb9240
commit 697ba1319f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -198,7 +198,7 @@ in {
systemd.enable = mkEnableOption "Waybar systemd integration";
systemd.target = mkOption {
type = str;
type = nullOr str;
default = config.wayland.systemd.target;
defaultText = literalExpression "config.wayland.systemd.target";
example = "sway-session.target";
@ -326,7 +326,8 @@ in {
KillMode = "mixed";
};
Install = { WantedBy = [ cfg.systemd.target ]; };
Install.WantedBy =
lib.optional (cfg.systemd.target != null) cfg.systemd.target;
};
})
]);