Laptop: Difference between revisions
m →TLP: use {{file}} template for configuration.nix |
m fix the language parameter in {{file}} template |
||
| Line 19: | Line 19: | ||
A common tool used to save power on laptops is [https://linrunner.de/tlp/index.html TLP], which has sensible defaults for most laptops. To enable TLP you simply just write <code>services.tlp.enable = true;</code> in your <code>configuration.nix</code>. However, if you need a specific configuration, you can do as shown in the example below. | A common tool used to save power on laptops is [https://linrunner.de/tlp/index.html TLP], which has sensible defaults for most laptops. To enable TLP you simply just write <code>services.tlp.enable = true;</code> in your <code>configuration.nix</code>. However, if you need a specific configuration, you can do as shown in the example below. | ||
{{file|configuration.nix| | {{file|configuration.nix|nix|3= | ||
services.tlp = { | services.tlp = { | ||
enable = true; | enable = true; | ||
| Line 47: | Line 47: | ||
Example of how to configure auto-cpufreq: | Example of how to configure auto-cpufreq: | ||
{{file|configuration.nix| | {{file|configuration.nix|nix|3= | ||
services.auto-cpufreq.enable = true; | services.auto-cpufreq.enable = true; | ||
services.auto-cpufreq.settings = { | services.auto-cpufreq.settings = { | ||
| Line 64: | Line 64: | ||
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| | {{file|flake.nix|nix|3= | ||
{ | { | ||
inputs = | inputs = | ||
| Line 90: | Line 90: | ||
}} | }} | ||
2) Then enable it in your <code>configuration.nix</code> file: | 2) Then enable it in your <code>configuration.nix</code> file: | ||
{{file|configuration.nix| | {{file|configuration.nix|nix|3= | ||
{ inputs, pkgs, ... }: { | { inputs, pkgs, ... }: { | ||
# ---Snip--- | # ---Snip--- | ||