diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2018-01-28 09:38:45 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2018-01-28 09:38:45 +0100 |
commit | 8ed3a90cdfe99722aee1d158a7d9f9bfd63ce275 (patch) | |
tree | 74771e2ff99c0f56d55d7318c70e8e2f4ffbefe6 /pkgs/applications/altcoins | |
parent | fff0daddce4999f0bdd428ee64be40cd8c26152e (diff) | |
download | nixlib-8ed3a90cdfe99722aee1d158a7d9f9bfd63ce275.tar nixlib-8ed3a90cdfe99722aee1d158a7d9f9bfd63ce275.tar.gz nixlib-8ed3a90cdfe99722aee1d158a7d9f9bfd63ce275.tar.bz2 nixlib-8ed3a90cdfe99722aee1d158a7d9f9bfd63ce275.tar.lz nixlib-8ed3a90cdfe99722aee1d158a7d9f9bfd63ce275.tar.xz nixlib-8ed3a90cdfe99722aee1d158a7d9f9bfd63ce275.tar.zst nixlib-8ed3a90cdfe99722aee1d158a7d9f9bfd63ce275.zip |
nixos/powerManagement: set `cpuFreqGovernor` with `mkOptionDefault`
`nixos-generate-config` detects the `cpuFreqGovernor` suited best for my machine, e.g. `powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";`. However the `powerManagement` module sets a sensitive default for `cpuFreqGovernor` using `mkDefault` to avoid breackage with older setups. Since 140ac2f1 the `hardware-configuration.nix` sets the gorvernor with `mkDefault` as well which causes evaluation errors if the powermanagement module is enabled: ``` error: The unique option `powerManagement.cpuFreqGovernor' is defined multiple times, in `/home/ma27/Projects/nixos-config/hardware-configuration.nix' and `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/config/power-management.nix'. ``` Using `mkOptionDefault` rather than `mkDefault` in the powermanagement module fixes this issue as it decreases the priority of the module and prefers the value set in `hardware-configuration.nix`. I have confirmed the change using the following VM declaration: ``` { cpuFreq = { lib, ... }: { powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.enable = true; }; } ```
Diffstat (limited to 'pkgs/applications/altcoins')
0 files changed, 0 insertions, 0 deletions