diff --git a/hosts/doloro-laptop/laptop.nix b/hosts/doloro-laptop/laptop.nix index e7a562e..0ab9c7a 100644 --- a/hosts/doloro-laptop/laptop.nix +++ b/hosts/doloro-laptop/laptop.nix @@ -239,7 +239,19 @@ in }; wantedBy = [ "battery.target" ]; partOf = [ "battery.target" ]; + }; + systemd.services.gpu-limit-on-ac = { + enable = true; + description = "Using rfkill; disable all rf devices before sleeping."; + before = [ "ac.target" ]; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.intel-gpu-tools}/bin/intel_gpu_frequency -d"; + RemainAfterExit = true; + }; + wantedBy = [ "ac.target" ]; + partOf = [ "ac.target" ]; }; systemd.services.rfkill-sleep-wake = { enable = true;