Skip to content

Commit

Permalink
chore: move tlp to laptop.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
Suya1671 committed May 24, 2024
1 parent 837498d commit 2799014
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
19 changes: 0 additions & 19 deletions systems/EVIL-LAPTOP/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,6 @@
];

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 = 60;

#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 100;
};
};

usbmuxd.enable = true;
avahi.enable = true;
Expand Down
20 changes: 20 additions & 0 deletions systems/modules/laptop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
upower.enable = true;
blueman.enable = true;

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 = 60;

#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 100;
};
};

# for until https://github.com/NixOS/nixpkgs/pull/292115 has been merged
pipewire.wireplumber.configPackages = [
(pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" ''
Expand Down

0 comments on commit 2799014

Please sign in to comment.