Laptop: Difference between revisions
typo |
m →auto-cpufreq: use {{file}} template instead of putting the filename inside a comment |
||
| Line 47: | Line 47: | ||
Example of how to configure auto-cpufreq: | Example of how to configure auto-cpufreq: | ||
{{file|configuration.nix|lang="nix"|3= | |||
services.auto-cpufreq.enable = true; | services.auto-cpufreq.enable = true; | ||
services.auto-cpufreq.settings = { | services.auto-cpufreq.settings = { | ||
| Line 59: | Line 59: | ||
}; | }; | ||
}; | }; | ||
}} | |||
Alternatively, if you have [[Flakes]] enabled you can also use the flake directly provided by the auto-cpufreq authors to get a more up-to-date version. They offer a detailed explanation how to add it to your system on their [https://github.com/AdnanHodzic/auto-cpufreq?tab=readme-ov-file#nixos GitHub page]. | Alternatively, if you have [[Flakes]] enabled you can also use the flake directly provided by the auto-cpufreq authors to get a more up-to-date version. They offer a detailed explanation how to add it to your system on their [https://github.com/AdnanHodzic/auto-cpufreq?tab=readme-ov-file#nixos GitHub page]. | ||
To summarize:</br> | To summarize:</br> | ||
1) add the flake as an input to your <code>flake.nix</code> file and enable the module: | 1) add the flake as an input to your <code>flake.nix</code> file and enable the module: | ||
{{file|flake.nix|lang="nix"|3= | |||
{ | { | ||
inputs = | inputs = | ||
| Line 89: | Line 88: | ||
}; | }; | ||
} | } | ||
}} | |||
2) Then enable it in your <code>configuration.nix</code> file: | |||
{{file|configuration.nix|lang="nix"|3= | |||
{ inputs, pkgs, ... }: { | { inputs, pkgs, ... }: { | ||
# ---Snip--- | # ---Snip--- | ||
| Line 110: | Line 109: | ||
# ---Snip--- | # ---Snip--- | ||
} | } | ||
}} | |||
Since v2.0 auto-cpufreq also includes a GUI that lets you temporarily override the CPU frequency governor setting. | Since v2.0 auto-cpufreq also includes a GUI that lets you temporarily override the CPU frequency governor setting. | ||