Move auto-cpufreq/firewall for wireguard to modules.
This commit is contained in:
parent
74c1b18ce2
commit
e3dbd06b82
4 changed files with 58 additions and 32 deletions
28
modules/nixos/auto-cpufreq.nix
Normal file
28
modules/nixos/auto-cpufreq.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
crony.auto-cpufreq.enable = lib.mkEnableOption "Enable auto-cpufreq and set it up for my laptop.";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.crony.auto-cpufreq.enable {
|
||||
# Setup auto-cpufreq
|
||||
programs.auto-cpufreq = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
battery = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
};
|
||||
|
||||
charger = {
|
||||
governor = "performance";
|
||||
turbo = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue