Enable auto-cpufreq for battery savings.

This commit is contained in:
jay
2025-07-21 16:15:33 -04:00
parent 4310c9d517
commit 894babd3da
3 changed files with 25 additions and 0 deletions

View File

@@ -10,6 +10,11 @@
inputs.nixpkgs.follows = "nixpkgs-stable-nixos"; inputs.nixpkgs.follows = "nixpkgs-stable-nixos";
}; };
auto-cpufreq-stable-nixos = {
url = "github:AdnanHodzic/auto-cpufreq";
inputs.nixpkgs.follows = "nixpkgs";
};
disko-stable-nixos = { disko-stable-nixos = {
url = "github:nix-community/disko"; url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs-stable-nixos"; inputs.nixpkgs.follows = "nixpkgs-stable-nixos";

View File

@@ -9,6 +9,8 @@
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
inputs.nixos-hardware.nixosModules.framework-16-7040-amd inputs.nixos-hardware.nixosModules.framework-16-7040-amd
inputs.auto-cpufreq.nixosModules.default
./programs/auto-cpufreq.nix
./programs/sof-firmware.nix ./programs/sof-firmware.nix
# Not working yet. # Not working yet.
./services/fprintd.nix ./services/fprintd.nix

View 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";
};
};
};
}