From d43ca1c8c10d4fc719b4387e1a373b9f5b5fad70 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Wed, 11 Jun 2025 12:21:16 +0100 Subject: [PATCH] Remove powertop & tlp Signed-off-by: Nikolaos Karaolidis --- hosts/common/configs/system/power/default.nix | 4 ++++ hosts/common/configs/system/powertop/default.nix | 6 ------ hosts/common/configs/system/powertop/mouse.sh | 16 ---------------- hosts/common/configs/system/tlp/default.nix | 12 ------------ hosts/elara/default.nix | 3 +-- hosts/elara/hardware/sas/default.nix | 2 -- hosts/himalia/default.nix | 3 +-- hosts/himalia/hardware/default.nix | 2 -- hosts/installer/default.nix | 1 + hosts/jupiter-vps/default.nix | 1 + hosts/jupiter/default.nix | 1 + hosts/jupiter/hardware/default.nix | 2 -- 12 files changed, 9 insertions(+), 44 deletions(-) create mode 100644 hosts/common/configs/system/power/default.nix delete mode 100644 hosts/common/configs/system/powertop/default.nix delete mode 100644 hosts/common/configs/system/powertop/mouse.sh delete mode 100644 hosts/common/configs/system/tlp/default.nix diff --git a/hosts/common/configs/system/power/default.nix b/hosts/common/configs/system/power/default.nix new file mode 100644 index 0000000..783fe93 --- /dev/null +++ b/hosts/common/configs/system/power/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + powerManagement.enable = true; +} diff --git a/hosts/common/configs/system/powertop/default.nix b/hosts/common/configs/system/powertop/default.nix deleted file mode 100644 index 199bb2f..0000000 --- a/hosts/common/configs/system/powertop/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs, ... }: -{ - environment.systemPackages = with pkgs; [ powertop ]; - powerManagement.powertop.enable = true; - systemd.services.powertop.postStart = builtins.readFile ./mouse.sh; -} diff --git a/hosts/common/configs/system/powertop/mouse.sh b/hosts/common/configs/system/powertop/mouse.sh deleted file mode 100644 index 9fe760c..0000000 --- a/hosts/common/configs/system/powertop/mouse.sh +++ /dev/null @@ -1,16 +0,0 @@ -# shellcheck shell=bash - -SEARCH_STRINGS=( - "Mouse" - "Razer DeathAdder V3 HyperSpeed" -) - -for search_string in "${SEARCH_STRINGS[@]}"; do - echo "Searching for devices matching: $search_string" - - grep -l "$search_string" /sys/bus/usb/devices/*/product 2>/dev/null | sed "s/product/power\\/control/" | while IFS= read -r device - do - echo "Setting power control to 'on' for: $device" - echo on >| "$device" - done -done diff --git a/hosts/common/configs/system/tlp/default.nix b/hosts/common/configs/system/tlp/default.nix deleted file mode 100644 index ea48f56..0000000 --- a/hosts/common/configs/system/tlp/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ ... }: -{ - services.tlp = { - enable = true; - settings = { - CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; - CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - }; - }; -} diff --git a/hosts/elara/default.nix b/hosts/elara/default.nix index 0b07371..a96eed5 100644 --- a/hosts/elara/default.nix +++ b/hosts/elara/default.nix @@ -33,7 +33,7 @@ ../common/configs/system/ntp ../common/configs/system/pipewire ../common/configs/system/podman - ../common/configs/system/powertop + ../common/configs/system/power ../common/configs/system/printing ../common/configs/system/smartmontools ../common/configs/system/sops @@ -42,7 +42,6 @@ ../common/configs/system/sudo ../common/configs/system/system ../common/configs/system/timezone - ../common/configs/system/tlp ../common/configs/system/tmux ../common/configs/system/upower ../common/configs/system/users diff --git a/hosts/elara/hardware/sas/default.nix b/hosts/elara/hardware/sas/default.nix index 8cb4323..8cfff7b 100644 --- a/hosts/elara/hardware/sas/default.nix +++ b/hosts/elara/hardware/sas/default.nix @@ -21,7 +21,5 @@ ]; }; - powerManagement.enable = true; - services.fstrim.enable = true; } diff --git a/hosts/himalia/default.nix b/hosts/himalia/default.nix index 174fc5b..43f23f2 100644 --- a/hosts/himalia/default.nix +++ b/hosts/himalia/default.nix @@ -29,7 +29,7 @@ ../common/configs/system/ntp ../common/configs/system/pipewire ../common/configs/system/podman - ../common/configs/system/powertop + ../common/configs/system/power ../common/configs/system/printing ../common/configs/system/smartmontools ../common/configs/system/sops @@ -38,7 +38,6 @@ ../common/configs/system/sudo ../common/configs/system/system ../common/configs/system/timezone - ../common/configs/system/tlp ../common/configs/system/tmux ../common/configs/system/upower ../common/configs/system/users diff --git a/hosts/himalia/hardware/default.nix b/hosts/himalia/hardware/default.nix index fd862d9..4935a95 100644 --- a/hosts/himalia/hardware/default.nix +++ b/hosts/himalia/hardware/default.nix @@ -77,8 +77,6 @@ nixpkgs.config.cudaSupport = true; - powerManagement.enable = true; - services = { xserver.videoDrivers = [ "nvidia" ]; fstrim.enable = true; diff --git a/hosts/installer/default.nix b/hosts/installer/default.nix index 1a5dfe0..78ec488 100644 --- a/hosts/installer/default.nix +++ b/hosts/installer/default.nix @@ -23,6 +23,7 @@ ../common/configs/system/nix-update ../common/configs/system/nixpkgs ../common/configs/system/ntp + ../common/configs/system/power ../common/configs/system/sops ../common/configs/system/ssh ../common/configs/system/ssh-agent diff --git a/hosts/jupiter-vps/default.nix b/hosts/jupiter-vps/default.nix index b9d1a68..9bc19c4 100644 --- a/hosts/jupiter-vps/default.nix +++ b/hosts/jupiter-vps/default.nix @@ -12,6 +12,7 @@ ../common/configs/system/nix ../common/configs/system/nixpkgs ../common/configs/system/podman + ../common/configs/system/power ../common/configs/system/sops ../common/configs/system/ssh ../common/configs/system/sshd diff --git a/hosts/jupiter/default.nix b/hosts/jupiter/default.nix index 5be03b0..963f903 100644 --- a/hosts/jupiter/default.nix +++ b/hosts/jupiter/default.nix @@ -21,6 +21,7 @@ ../common/configs/system/nixpkgs ../common/configs/system/ntp ../common/configs/system/podman + ../common/configs/system/power ../common/configs/system/smartmontools ../common/configs/system/sops ../common/configs/system/ssh diff --git a/hosts/jupiter/hardware/default.nix b/hosts/jupiter/hardware/default.nix index 336b30b..902816c 100644 --- a/hosts/jupiter/hardware/default.nix +++ b/hosts/jupiter/hardware/default.nix @@ -69,8 +69,6 @@ rocmSupport = true; }; - powerManagement.enable = true; - services = { xserver.videoDrivers = [ "nvidia" ]; fstrim.enable = true;