From 5c27dda9aaf79bca3000c9e61c0fcb69ad5590ba Mon Sep 17 00:00:00 2001 From: Alejandro Angulo Date: Sun, 26 Mar 2023 10:11:18 -0700 Subject: [PATCH] Added powertop config --- modules/monitoring/powertop/default.nix | 20 ++++++++++++++++++++ systems/x86_64-linux/gospel/default.nix | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 modules/monitoring/powertop/default.nix diff --git a/modules/monitoring/powertop/default.nix b/modules/monitoring/powertop/default.nix new file mode 100644 index 0000000..c713a0e --- /dev/null +++ b/modules/monitoring/powertop/default.nix @@ -0,0 +1,20 @@ +{ + options, + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.aa.monitoring.powertop; +in { + options.aa.monitoring.powertop = with types; { + enable = mkEnableOption "powertop"; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [powertop]; + + powerManagement.powertop.enable = true; + }; +} diff --git a/systems/x86_64-linux/gospel/default.nix b/systems/x86_64-linux/gospel/default.nix index 35de33a..d7d03c2 100644 --- a/systems/x86_64-linux/gospel/default.nix +++ b/systems/x86_64-linux/gospel/default.nix @@ -43,6 +43,8 @@ hardware.audio.enable = true; system.zfs.enable = true; + + monitoring.powertop.enable = true; }; boot.binfmt.emulatedSystems = ["aarch64-linux" "armv6l-linux"];