summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas Strobel <ts468@cam.ac.uk>2015-10-06 18:47:47 +0200
committerThomas Strobel <ts468@cam.ac.uk>2015-10-06 20:12:40 +0200
commitd5604f0b22daf8a0ec341c70607f014dfc9bf207 (patch)
treebb5f3c71f33eca937601b3be51359bd825f667f9
parentacb1b3cdd006f1396221262325586e6faa724dff (diff)
downloadnixpkgs-d5604f0b22daf8a0ec341c70607f014dfc9bf207.tar
nixpkgs-d5604f0b22daf8a0ec341c70607f014dfc9bf207.tar.gz
nixpkgs-d5604f0b22daf8a0ec341c70607f014dfc9bf207.tar.bz2
nixpkgs-d5604f0b22daf8a0ec341c70607f014dfc9bf207.tar.lz
nixpkgs-d5604f0b22daf8a0ec341c70607f014dfc9bf207.tar.xz
nixpkgs-d5604f0b22daf8a0ec341c70607f014dfc9bf207.tar.zst
nixpkgs-d5604f0b22daf8a0ec341c70607f014dfc9bf207.zip
power management: restart post-resume.target on resume
Trigger a restart of the post-resume.target on resume.
That allows other systemd services to receive the restart signal
after resume by becoming 'partOf' the post-resume.target.
-rw-r--r--nixos/modules/config/power-management.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/config/power-management.nix b/nixos/modules/config/power-management.nix
index 32a7987617a..dedc8a3f679 100644
--- a/nixos/modules/config/power-management.nix
+++ b/nixos/modules/config/power-management.nix
@@ -98,6 +98,7 @@ in
         after = [ "suspend.target" "hibernate.target" "hybrid-sleep.target" ];
         script =
           ''
+            ${config.systemd.package}/bin/systemctl try-restart post-resume.target
             ${cfg.resumeCommands}
             ${cfg.powerUpCommands}
           '';