Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waybar: allow setting systemd.target to null #6241

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flokli
Copy link
Contributor

@flokli flokli commented Dec 29, 2024

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.

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@berbiche

@@ -324,7 +324,9 @@ in {
KillMode = "mixed";
};

Install = { WantedBy = [ cfg.systemd.target ]; };
Install = optional (cfg.systemd.target != null) {
WantedBy = [ cfg.systemd.target ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks weird, wouldn't

Install.WantedBy = lib.optional (cfg.systemd.target != null) cfg.systemd.target;

or

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

Make more sense?
From noogle
"Return a singleton list or an empty list, depending on a boolean value. Useful when building lists with optional elements (e.g. ++ optional (system == "i686-linux") firefox)."

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.
@flokli flokli force-pushed the waybar-opional-systemd-target branch from ada312c to c893413 Compare December 30, 2024 11:29
Copy link
Contributor

@Lillecarl Lillecarl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants