]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/tlp.nix
courge: install
[julm/julm-nix.git] / nixos / profiles / tlp.nix
1 { lib, config, ... }:
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 # Gnome 40 introduced a new way of managing power, without tlp.
12 enable = mkDefault (!config.services.power-profiles-daemon.enable);
13 settings = {
14 CPU_SCALING_GOVERNOR_ON_AC = "ondemand";
15 CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
16 };
17 };
18 }