Enable auto-cpufreq for battery savings.
This commit is contained in:
@@ -10,6 +10,11 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable-nixos";
|
||||
};
|
||||
|
||||
auto-cpufreq-stable-nixos = {
|
||||
url = "github:AdnanHodzic/auto-cpufreq";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
disko-stable-nixos = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable-nixos";
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.nixos-hardware.nixosModules.framework-16-7040-amd
|
||||
inputs.auto-cpufreq.nixosModules.default
|
||||
./programs/auto-cpufreq.nix
|
||||
./programs/sof-firmware.nix
|
||||
# Not working yet.
|
||||
./services/fprintd.nix
|
||||
|
||||
18
nodes/hosts/nixwork/programs/auto-cpufreq.nix
Normal file
18
nodes/hosts/nixwork/programs/auto-cpufreq.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ pkgs, ... }: {
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
programs.auto-cpufreq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
charger = {
|
||||
governor = "performance";
|
||||
turbo = "auto";
|
||||
};
|
||||
battery = {
|
||||
governor = "power-saver";
|
||||
turbo = "never";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user