Add auto-cpufreq for power management.
This commit is contained in:
parent
11d7923b72
commit
38494003cc
21
flake.lock
generated
21
flake.lock
generated
@ -1,5 +1,25 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"auto-cpufreq": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1737497253,
|
||||||
|
"narHash": "sha256-sOLwi/3oQiNWA2I3WiGneK988YdKVHbH1P5lEjxypIg=",
|
||||||
|
"owner": "AdnanHodzic",
|
||||||
|
"repo": "auto-cpufreq",
|
||||||
|
"rev": "4cee388c1bbea3adc333b597717d5d8d12375705",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "AdnanHodzic",
|
||||||
|
"repo": "auto-cpufreq",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"base16": {
|
"base16": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"fromYaml": "fromYaml"
|
"fromYaml": "fromYaml"
|
||||||
@ -3231,6 +3251,7 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"auto-cpufreq": "auto-cpufreq",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nvf": "nvf",
|
"nvf": "nvf",
|
||||||
|
@ -19,12 +19,19 @@
|
|||||||
url = "github:notashelf/nvf";
|
url = "github:notashelf/nvf";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# auto-cpufreq latest version, for optimizing my laptop's thermal's
|
||||||
|
auto-cpufreq = {
|
||||||
|
url = "github:AdnanHodzic/auto-cpufreq";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
home-manager,
|
home-manager,
|
||||||
|
auto-cpufreq,
|
||||||
...
|
...
|
||||||
} @ inputs: {
|
} @ inputs: {
|
||||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
||||||
@ -34,6 +41,8 @@
|
|||||||
./hosts/nixos/configuration.nix
|
./hosts/nixos/configuration.nix
|
||||||
# Enable stylix
|
# Enable stylix
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
|
# Load updated auto-cpufreq
|
||||||
|
auto-cpufreq.nixosModules.default
|
||||||
# Load my modules
|
# Load my modules
|
||||||
./modules/nixos
|
./modules/nixos
|
||||||
# Setup home manager for my user
|
# Setup home manager for my user
|
||||||
|
@ -95,6 +95,23 @@
|
|||||||
options = ["_netdev" "noauto" "x-systemd.automount" "x-systemd.mount-timeout=10" "timeo=14" "x-systemd.idle-timeout=600"];
|
options = ["_netdev" "noauto" "x-systemd.automount" "x-systemd.mount-timeout=10" "timeo=14" "x-systemd.idle-timeout=600"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Setup auto-cpufreq
|
||||||
|
programs.auto-cpufreq = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
battery = {
|
||||||
|
governor = "powersave";
|
||||||
|
turbo = "never";
|
||||||
|
};
|
||||||
|
|
||||||
|
charger = {
|
||||||
|
governor = "performance";
|
||||||
|
turbo = "auto";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Allow for wireguard traffic
|
# Allow for wireguard traffic
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
# if packets are still dropped, they will show up in dmesg
|
# if packets are still dropped, they will show up in dmesg
|
||||||
|
Loading…
x
Reference in New Issue
Block a user