]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/tlp.nix
nix: avoid nixpkgs-patched when not needed
[julm/julm-nix.git] / nixos / profiles / tlp.nix
1 { lib, ... }:
2 with lib;
3 {
4 # Preloading the kernel modules to avoid:
5 # tlp: Error in configuration at CPU_SCALING_GOVERNOR_ON_BAT="powersave": governor not available. Skipped.
6 boot.initrd.kernelModules = [
7 "cpufreq_ondemand"
8 "cpufreq_powersave"
9 ];
10 services.tlp = {
11 enable = true;
12 settings = {
13 CPU_SCALING_GOVERNOR_ON_AC = "ondemand";
14 CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
15 };
16 };
17 }