-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
swaylock: avoid inadvertently installing swaylock #875
Conversation
Concerned that this may cause an infinite recursion with the aforementioned older state versions, as the default value of |
Should we support older versions? Otherwise, it might be better to upstream this to Home Manager. |
What do you mean? Presumably the condition exists in Home Manager for backwards compatibility with old configuration which relied on the automatic |
@niksingh710, can you test this PR? |
@trueNAHO just tested the pr, and now swaylock is not installed. |
Avoid inadvertently installing the Swaylock package by preventing the Home Manager module from enabling itself when 'settings != {}' and the state version is older than 23.05 [1]. [1]: https://github.com/nix-community/home-manager/blob/5cfbf5cc37a3bd1da07ae84eea1b828909c4456b/modules/programs/swaylock.nix#L12-L17 Closes: #843 Link: #875 Tested-by: https://github.com/niksingh710 Co-authored-by: NAHO <[email protected]> Reviewed-by: NAHO <[email protected]>
7f7c001
to
1ca8dbb
Compare
Avoid inadvertently installing the Swaylock package by preventing the Home Manager module from enabling itself when 'settings != {}' and the state version is older than 23.05 [1]. [1]: https://github.com/nix-community/home-manager/blob/5cfbf5cc37a3bd1da07ae84eea1b828909c4456b/modules/programs/swaylock.nix#L12-L17 Closes: danth#843 Link: danth#875 Tested-by: https://github.com/niksingh710 Co-authored-by: NAHO <[email protected]> Reviewed-by: NAHO <[email protected]>
Although the initial pull request was approved [1], a conversation on Matrix suggests that infinite recursion is indeed possible in certain cases [2]. [1]: #875 [2]: https://matrix.to/#/!FBhBUKKFkbUIElLvaF:danth.me/$yZz3nJYu9RgaN3736fxF1xY0BfzceGRSsvpiXSq6go4
Although the initial pull request was approved [1], a conversation on Matrix suggests that infinite recursion is indeed possible in certain cases [2]. [1]: #875 [2]: https://matrix.to/#/!FBhBUKKFkbUIElLvaF:danth.me/$yZz3nJYu9RgaN3736fxF1xY0BfzceGRSsvpiXSq6go4
The swaylock Home Manager module automatically enables itself when
settings != {}
and the state version is earlier than23.05
:https://github.com/nix-community/home-manager/blob/5cfbf5cc37a3bd1da07ae84eea1b828909c4456b/modules/programs/swaylock.nix#L12-L17
This corrects the Stylix module to avoid providing settings unless the user already has swaylock enabled, so that swaylock is not installed for all Stylix users.
Fixes #843