diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-03-25 21:44:14 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-03-25 21:51:08 +0530 |
commit | 46f4f7865cd423ea455d27c190f4245b073d0e90 (patch) | |
tree | b4f9f67a49e081045dd625d655c078468c2b16f6 | |
parent | 83b7aae54bde197ad7d6a6e0615fc5770929625a (diff) |
cez/tlp: init
-rw-r--r-- | nixos/cez/configuration.nix | 1 | ||||
-rw-r--r-- | nixos/cez/modules/tlp.nix | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/nixos/cez/configuration.nix b/nixos/cez/configuration.nix index 720ee10..01420e0 100644 --- a/nixos/cez/configuration.nix +++ b/nixos/cez/configuration.nix @@ -12,6 +12,7 @@ in ./modules/sshfs.nix ./modules/wireguard.nix ./modules/network.nix + ./modules/tlp.nix ]; boot = { diff --git a/nixos/cez/modules/tlp.nix b/nixos/cez/modules/tlp.nix new file mode 100644 index 0000000..912fd5f --- /dev/null +++ b/nixos/cez/modules/tlp.nix @@ -0,0 +1,26 @@ +{ ... }: { + services.tlp = { + enable = true; + + settings = { + RADEON_DPM_STATE_ON_AC = "performance"; + RADEON_DPM_STATE_ON_BAT = "battery"; + + NMI_WATCHDOG = 0; + + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + + DEVICES_TO_ENABLE_ON_AC = "bluetooth"; + DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE = "bluetooth"; + + CPU_BOOST_ON_AC = 1; + CPU_BOOST_ON_BAT = 0; + CPU_HWP_DYN_BOOST_ON_AC = 1; + CPU_HWP_DYN_BOOST_ON_BAT = 0; + + PLATFORM_PROFILE_ON_AC = "balanced"; + PLATFORM_PROFILE_ON_BAT = "low-power"; + }; + }; +} |