From 697ba1319fdc58c94dc94cd7908df554dc48d970 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 30 Jan 2025 01:16:15 +0200 Subject: [PATCH] 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. --- modules/programs/waybar.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix index dbbe89c3d..2239fe5ef 100644 --- a/modules/programs/waybar.nix +++ b/modules/programs/waybar.nix @@ -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; }; }) ]);