From e6f0a1e7ebceac4e25150384008f5b051aa8be03 Mon Sep 17 00:00:00 2001 From: Atemu Date: Sat, 22 Feb 2020 12:43:06 +0100 Subject: [PATCH] undervolt: apply undervolt on boot and resume The undervolt did not persist reboots or sleep/hibernation. With this change you should no longer have to apply the undervolt on a timer --- nixos/modules/services/hardware/undervolt.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/services/hardware/undervolt.nix b/nixos/modules/services/hardware/undervolt.nix index 828032dc573a..1f1a6d674787 100644 --- a/nixos/modules/services/hardware/undervolt.nix +++ b/nixos/modules/services/hardware/undervolt.nix @@ -114,6 +114,11 @@ in path = [ pkgs.undervolt ]; description = "Intel Undervolting Service"; + + # Apply undervolt on boot, nixos generation switch and resume + wantedBy = [ "multi-user.target" "post-resume.target" ]; + after = [ "post-resume.target" ]; # Not sure why but it won't work without this + serviceConfig = { Type = "oneshot"; Restart = "no";