From 2d84bd320123a690647881ca7ad36bb40f88863c Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Thu, 16 Mar 2023 23:35:56 +0530 Subject: [PATCH] run cpupower with NOPASSWD --- system/default.nix | 4 +++- system/kernel.nix | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/system/default.nix b/system/default.nix index 0fee9c6..359eb62 100644 --- a/system/default.nix +++ b/system/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: { +{ config, lib, pkgs, ... }: { imports = [ ./filesystem.nix @@ -73,6 +73,8 @@ package = pkgs.sudo.override { withInsults = true; }; extraConfig = '' Defaults lecture="never" + + %wheel ALL=NOPASSWD: ${config.boot.kernelPackages.cpupower}/bin/cpupower ''; wheelNeedsPassword = true; }; diff --git a/system/kernel.nix b/system/kernel.nix index aff05b9..a9e5647 100644 --- a/system/kernel.nix +++ b/system/kernel.nix @@ -14,7 +14,7 @@ kernelModules = [ "i915" ]; }; kernelModules = [ "kvm-intel" ]; - kernelPackages = pkgs.linuxPackages_zen; + kernelPackages = pkgs.linuxKernel.packages.linux_zen; }; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";