aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-05-10 14:57:19 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-05-10 14:57:19 +0530
commitce5908ed1c96ac3e8cf9e9aa471441a1d653ab3b (patch)
tree8d7202ffcabeafb700562ea122b500e26d7af68c /nixos
parent8c1a8c052568c6f3fd9a76d01fc6bf694b85ff6e (diff)
switched from power-profiles-daemon to tlp & removed the option to manually change the power mode, tlp does it automatically now!
Diffstat (limited to 'nixos')
-rw-r--r--nixos/configuration.nix1
-rw-r--r--nixos/opt/nvidia.nix4
-rw-r--r--nixos/power-management.nix22
-rw-r--r--nixos/services.nix1
4 files changed, 26 insertions, 2 deletions
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
index c17e4c9..8044d8e 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -5,6 +5,7 @@
../hardware-configuration.nix
./cachix.nix
./boot.nix
+ ./power-management.nix
./services.nix
./home.nix
./desktop-environment.nix
diff --git a/nixos/opt/nvidia.nix b/nixos/opt/nvidia.nix
index 191fa98..4373165 100644
--- a/nixos/opt/nvidia.nix
+++ b/nixos/opt/nvidia.nix
@@ -7,7 +7,9 @@
nvidiaSettings = true;
open = false;
prime = {
-
+ sync.enable = true;
+ nvidiaBusId = "PCI:1:0:0";
+ intelBusId = "PCI:0:2:0";
};
};
hardware.graphics.enable32Bit = true;
diff --git a/nixos/power-management.nix b/nixos/power-management.nix
new file mode 100644
index 0000000..3600374
--- /dev/null
+++ b/nixos/power-management.nix
@@ -0,0 +1,22 @@
+{ config, pkgs, ... }:
+{
+ services.power-profiles-daemon.enable = false;
+ services.tlp = {
+ enable = true;
+ settings = {
+ CPU_SCALING_GOVERNOR_ON_AC = "performance";
+ CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
+
+ CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
+ CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
+
+ CPU_MIN_PERF_ON_AC = 0;
+ CPU_MAX_PERF_ON_AC = 100;
+ CPU_MIN_PERF_ON_BAT = 0;
+ CPU_MAX_PERF_ON_BAT = 20;
+
+ START_CHARGE_THRESH_BAT1 = 40;
+ STOP_CHARGE_THRESH_BAT1 = 80;
+ };
+ };
+}
diff --git a/nixos/services.nix b/nixos/services.nix
index 0aa96d5..5c17b64 100644
--- a/nixos/services.nix
+++ b/nixos/services.nix
@@ -28,7 +28,6 @@
pulse.enable = true;
wireplumber.enable = true;
};
- services.power-profiles-daemon.enable = true;
services.cloudflare-warp.enable = true;
services.openssh.enable = true;
services.flatpak.enable = true;