Add auto-cpufreq for adaptive CPU frequency scaling
This commit is contained in:
21
flake.lock
generated
21
flake.lock
generated
@@ -1,5 +1,25 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"auto-cpufreq": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1758887019,
|
||||||
|
"narHash": "sha256-5QDHaIKbmremgFh8Pc9ess59K4HJ5APM8pNgnYzAMno=",
|
||||||
|
"owner": "AdnanHodzic",
|
||||||
|
"repo": "auto-cpufreq",
|
||||||
|
"rev": "52194f4db364347626985fed5372eba2b6109cf4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "AdnanHodzic",
|
||||||
|
"repo": "auto-cpufreq",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"base16": {
|
"base16": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"fromYaml": "fromYaml"
|
"fromYaml": "fromYaml"
|
||||||
@@ -276,6 +296,7 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"auto-cpufreq": "auto-cpufreq",
|
||||||
"firefox-addons": "firefox-addons",
|
"firefox-addons": "firefox-addons",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
|
|||||||
@@ -14,6 +14,11 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
auto-cpufreq = {
|
||||||
|
url = "github:AdnanHodzic/auto-cpufreq";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
firefox-addons = {
|
firefox-addons = {
|
||||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@@ -32,6 +37,7 @@
|
|||||||
nixpkgs,
|
nixpkgs,
|
||||||
home-manager,
|
home-manager,
|
||||||
nix-flatpak,
|
nix-flatpak,
|
||||||
|
auto-cpufreq,
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
let
|
let
|
||||||
@@ -59,6 +65,7 @@
|
|||||||
modules = [
|
modules = [
|
||||||
./profiles/${profile}
|
./profiles/${profile}
|
||||||
nix-flatpak.nixosModules.nix-flatpak
|
nix-flatpak.nixosModules.nix-flatpak
|
||||||
|
auto-cpufreq.nixosModules.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|||||||
17
modules/core/auto-cpufreq.nix
Normal file
17
modules/core/auto-cpufreq.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.auto-cpufreq = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
charger = {
|
||||||
|
governor = "performance";
|
||||||
|
turbo = "auto";
|
||||||
|
};
|
||||||
|
|
||||||
|
battery = {
|
||||||
|
governor = "powersave";
|
||||||
|
turbo = "auto";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./packages
|
./packages
|
||||||
|
./auto-cpufreq.nix
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./flatpak.nix
|
./flatpak.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
|
|||||||
Reference in New Issue
Block a user