Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: e305380f0c3f
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 50dda062d872
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jan 28, 2018

  1. 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;
      };
    }
    ```
    Ma27 committed Jan 28, 2018
    Copy the full SHA
    8ed3a90 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #34350 from Ma27/fix-powermanagement-default

    nixos/powerManagement: set `cpuFreqGovernor` with `mkOptionDefault`
    fpletz committed Jan 28, 2018
    Copy the full SHA
    50dda06 View commit details
    Browse the repository at this point in the history