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
nixos/physlock: add suspend-then-hibernate to lockOn.suspend units #74589
Conversation
Thank you for your contributions.
|
Until this commit is merged (or in case it wont), one can set |
@@ -105,7 +105,7 @@ in | |||
wantedBy = optional cfg.lockOn.suspend "suspend.target" | |||
++ optional cfg.lockOn.hibernate "hibernate.target" | |||
++ cfg.lockOn.extraTargets; | |||
before = optional cfg.lockOn.suspend "systemd-suspend.service" | |||
before = optionals cfg.lockOn.suspend [ "systemd-suspend.service" "systemd-suspend-then-hibernate.service" ] | |||
++ optional cfg.lockOn.hibernate "systemd-hibernate.service" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be added for lockOn.hibernate
as well then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split it into a new optional (suspend || hibernate)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
Motivation for this change
I set
services.logind.lidSwitch = "suspend-then-hibernate";
which unexpectedly nullifiedservices.physlock.lockOn.suspend = true
; I figure since it's a "suspend and then hibernate", we should lock beforesystemd-suspend-then-hibernate.service
too.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
N/A