From 7ebbaca0817b2f379b39e8f34cffa9aff06c3c8a Mon Sep 17 00:00:00 2001 From: jay Date: Sun, 3 Aug 2025 07:56:55 -0400 Subject: [PATCH] Set up power profiles everywhere. --- nodes/hosts/common/configuration.nix | 1 + .../common/services/power-profiles-daemon.nix | 3 +++ nodes/hosts/nixwork/configuration.nix | 3 --- nodes/hosts/nixwork/programs/auto-cpufreq.nix | 18 ------------------ .../nixwork/services/power-profiles-daemon.nix | 3 --- 5 files changed, 4 insertions(+), 24 deletions(-) create mode 100644 nodes/hosts/common/services/power-profiles-daemon.nix delete mode 100644 nodes/hosts/nixwork/programs/auto-cpufreq.nix delete mode 100644 nodes/hosts/nixwork/services/power-profiles-daemon.nix diff --git a/nodes/hosts/common/configuration.nix b/nodes/hosts/common/configuration.nix index 108d75e..a9b829b 100644 --- a/nodes/hosts/common/configuration.nix +++ b/nodes/hosts/common/configuration.nix @@ -26,6 +26,7 @@ ./services/desktopmanager.nix ./services/displaymanager.nix ./services/nix-flatpak.nix + ./services/power-profiles-daemon.nix ./services/sound.nix ./system/bluetooth.nix ./system/bootloader.nix diff --git a/nodes/hosts/common/services/power-profiles-daemon.nix b/nodes/hosts/common/services/power-profiles-daemon.nix new file mode 100644 index 0000000..7c9438a --- /dev/null +++ b/nodes/hosts/common/services/power-profiles-daemon.nix @@ -0,0 +1,3 @@ +{ pkgs, ...}: { + services.power-profiles-daemon.enable = "true"; +} diff --git a/nodes/hosts/nixwork/configuration.nix b/nodes/hosts/nixwork/configuration.nix index c4950a7..90e7f15 100644 --- a/nodes/hosts/nixwork/configuration.nix +++ b/nodes/hosts/nixwork/configuration.nix @@ -9,13 +9,10 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix inputs.nixos-hardware.nixosModules.framework-16-7040-amd - inputs.auto-cpufreq.nixosModules.default - ./programs/auto-cpufreq.nix ./programs/sof-firmware.nix # Not working yet. ./services/fprintd.nix ./services/lidswitch.nix - ./services/power-profiles-daemon.nix ./services/touchpad.nix ./system/bootloader.nix ./system/filesystems.nix diff --git a/nodes/hosts/nixwork/programs/auto-cpufreq.nix b/nodes/hosts/nixwork/programs/auto-cpufreq.nix deleted file mode 100644 index 56ea8e0..0000000 --- a/nodes/hosts/nixwork/programs/auto-cpufreq.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ pkgs, ... }: { - # List packages installed in system profile. To search, run: - # $ nix search wget - programs.auto-cpufreq = { - enable = false; - settings = { - charger = { - governor = "performance"; - turbo = "auto"; - }; - battery = { - governor = "power-saver"; - turbo = "never"; - }; - }; - }; -} - diff --git a/nodes/hosts/nixwork/services/power-profiles-daemon.nix b/nodes/hosts/nixwork/services/power-profiles-daemon.nix deleted file mode 100644 index b450283..0000000 --- a/nodes/hosts/nixwork/services/power-profiles-daemon.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ pkgs, ...}: { - # services.power-profiles-daemon.enable = "true"; -}