Skip to content

Commit

Permalink
waybar: allow setting systemd.target to null
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
flokli committed Dec 30, 2024
1 parent 10e99c4 commit c893413
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/programs/waybar.nix
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ in {
systemd.enable = mkEnableOption "Waybar systemd integration";

systemd.target = mkOption {
type = str;
type = nullOr str;
default = "graphical-session.target";
example = "sway-session.target";
description = ''
Expand Down Expand Up @@ -324,7 +324,8 @@ in {
KillMode = "mixed";
};

Install = { WantedBy = [ cfg.systemd.target ]; };
Install.WantedBy =
lib.optional (cfg.systemd.target != null) cfg.systemd.target;
};
})
]);
Expand Down

0 comments on commit c893413

Please sign in to comment.