nixos/power-management: run post-resume after suspend-then-hibernate

The suspend-then-hibernate functionality is implemented by systemd in
the suspend-then-hibernate.target, separately from suspend.target and
hibernate.target. Thus post-resume would not run after resuming from
suspend-then-hibernate.

Fix this by explicitly making post-resume run after
suspend-then-hibernate.
This commit is contained in:
Alois Wohlschlager 2022-07-22 18:33:37 +02:00
parent 87cb1156a9
commit fe44207a71
No known key found for this signature in database
GPG Key ID: E0F59EA5E5216914

View File

@ -91,7 +91,7 @@ in
systemd.services.post-resume =
{ description = "Post-Resume Actions";
after = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" ];
after = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target" ];
script =
''
/run/current-system/systemd/bin/systemctl try-restart post-resume.target