run cpupower with NOPASSWD

This commit is contained in:
Adithya 2023-03-16 23:35:56 +05:30
parent e588bae35d
commit 2d84bd3201
No known key found for this signature in database
GPG key ID: 0C7F35F4F821290F
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{ lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
imports = [ imports = [
./filesystem.nix ./filesystem.nix
@ -73,6 +73,8 @@
package = pkgs.sudo.override { withInsults = true; }; package = pkgs.sudo.override { withInsults = true; };
extraConfig = '' extraConfig = ''
Defaults lecture="never" Defaults lecture="never"
%wheel ALL=NOPASSWD: ${config.boot.kernelPackages.cpupower}/bin/cpupower
''; '';
wheelNeedsPassword = true; wheelNeedsPassword = true;
}; };

View file

@ -14,7 +14,7 @@
kernelModules = [ "i915" ]; kernelModules = [ "i915" ];
}; };
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
kernelPackages = pkgs.linuxPackages_zen; kernelPackages = pkgs.linuxKernel.packages.linux_zen;
}; };
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";