Remove powertop & tlp
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
4
hosts/common/configs/system/power/default.nix
Normal file
4
hosts/common/configs/system/power/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
powerManagement.enable = true;
|
||||||
|
}
|
@@ -1,6 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [ powertop ];
|
|
||||||
powerManagement.powertop.enable = true;
|
|
||||||
systemd.services.powertop.postStart = builtins.readFile ./mouse.sh;
|
|
||||||
}
|
|
@@ -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
|
|
@@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@@ -33,7 +33,7 @@
|
|||||||
../common/configs/system/ntp
|
../common/configs/system/ntp
|
||||||
../common/configs/system/pipewire
|
../common/configs/system/pipewire
|
||||||
../common/configs/system/podman
|
../common/configs/system/podman
|
||||||
../common/configs/system/powertop
|
../common/configs/system/power
|
||||||
../common/configs/system/printing
|
../common/configs/system/printing
|
||||||
../common/configs/system/smartmontools
|
../common/configs/system/smartmontools
|
||||||
../common/configs/system/sops
|
../common/configs/system/sops
|
||||||
@@ -42,7 +42,6 @@
|
|||||||
../common/configs/system/sudo
|
../common/configs/system/sudo
|
||||||
../common/configs/system/system
|
../common/configs/system/system
|
||||||
../common/configs/system/timezone
|
../common/configs/system/timezone
|
||||||
../common/configs/system/tlp
|
|
||||||
../common/configs/system/tmux
|
../common/configs/system/tmux
|
||||||
../common/configs/system/upower
|
../common/configs/system/upower
|
||||||
../common/configs/system/users
|
../common/configs/system/users
|
||||||
|
@@ -21,7 +21,5 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
powerManagement.enable = true;
|
|
||||||
|
|
||||||
services.fstrim.enable = true;
|
services.fstrim.enable = true;
|
||||||
}
|
}
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
../common/configs/system/ntp
|
../common/configs/system/ntp
|
||||||
../common/configs/system/pipewire
|
../common/configs/system/pipewire
|
||||||
../common/configs/system/podman
|
../common/configs/system/podman
|
||||||
../common/configs/system/powertop
|
../common/configs/system/power
|
||||||
../common/configs/system/printing
|
../common/configs/system/printing
|
||||||
../common/configs/system/smartmontools
|
../common/configs/system/smartmontools
|
||||||
../common/configs/system/sops
|
../common/configs/system/sops
|
||||||
@@ -38,7 +38,6 @@
|
|||||||
../common/configs/system/sudo
|
../common/configs/system/sudo
|
||||||
../common/configs/system/system
|
../common/configs/system/system
|
||||||
../common/configs/system/timezone
|
../common/configs/system/timezone
|
||||||
../common/configs/system/tlp
|
|
||||||
../common/configs/system/tmux
|
../common/configs/system/tmux
|
||||||
../common/configs/system/upower
|
../common/configs/system/upower
|
||||||
../common/configs/system/users
|
../common/configs/system/users
|
||||||
|
@@ -77,8 +77,6 @@
|
|||||||
|
|
||||||
nixpkgs.config.cudaSupport = true;
|
nixpkgs.config.cudaSupport = true;
|
||||||
|
|
||||||
powerManagement.enable = true;
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
xserver.videoDrivers = [ "nvidia" ];
|
xserver.videoDrivers = [ "nvidia" ];
|
||||||
fstrim.enable = true;
|
fstrim.enable = true;
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
../common/configs/system/nix-update
|
../common/configs/system/nix-update
|
||||||
../common/configs/system/nixpkgs
|
../common/configs/system/nixpkgs
|
||||||
../common/configs/system/ntp
|
../common/configs/system/ntp
|
||||||
|
../common/configs/system/power
|
||||||
../common/configs/system/sops
|
../common/configs/system/sops
|
||||||
../common/configs/system/ssh
|
../common/configs/system/ssh
|
||||||
../common/configs/system/ssh-agent
|
../common/configs/system/ssh-agent
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
../common/configs/system/nix
|
../common/configs/system/nix
|
||||||
../common/configs/system/nixpkgs
|
../common/configs/system/nixpkgs
|
||||||
../common/configs/system/podman
|
../common/configs/system/podman
|
||||||
|
../common/configs/system/power
|
||||||
../common/configs/system/sops
|
../common/configs/system/sops
|
||||||
../common/configs/system/ssh
|
../common/configs/system/ssh
|
||||||
../common/configs/system/sshd
|
../common/configs/system/sshd
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
../common/configs/system/nixpkgs
|
../common/configs/system/nixpkgs
|
||||||
../common/configs/system/ntp
|
../common/configs/system/ntp
|
||||||
../common/configs/system/podman
|
../common/configs/system/podman
|
||||||
|
../common/configs/system/power
|
||||||
../common/configs/system/smartmontools
|
../common/configs/system/smartmontools
|
||||||
../common/configs/system/sops
|
../common/configs/system/sops
|
||||||
../common/configs/system/ssh
|
../common/configs/system/ssh
|
||||||
|
@@ -69,8 +69,6 @@
|
|||||||
rocmSupport = true;
|
rocmSupport = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
powerManagement.enable = true;
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
xserver.videoDrivers = [ "nvidia" ];
|
xserver.videoDrivers = [ "nvidia" ];
|
||||||
fstrim.enable = true;
|
fstrim.enable = true;
|
||||||
|
Reference in New Issue
Block a user