My nixpkgs mirror for patching things.
Go to file
Maximilian Bosch 8ed3a90cdf
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;
  };
}
```
2018-01-28 09:38:45 +01:00
.github CODEOWNERS: Make @orivej a {cc,bintools}-wrapper codeowner 2018-01-19 16:18:27 -05:00
doc doc: Cross chapter: Add note on why use example platforms 2018-01-26 12:38:34 -05:00
lib lib, openssl: Get rid of openssl.system 2018-01-26 21:22:00 -05:00
maintainers/scripts debian-patches.sh: patch-tracker is long-since dead, fix to use sources? 2018-01-17 13:17:45 -06:00
nixos nixos/powerManagement: set cpuFreqGovernor with mkOptionDefault 2018-01-28 09:38:45 +01:00
pkgs streamlink: 0.9.0 -> 0.10.0 2018-01-27 16:10:46 +02:00
.editorconfig Do not trim trailing whitespace in patch files 2017-01-12 23:44:26 +01:00
.gitignore kde5: consolidate packages into desktops/kde-5 2016-03-01 10:36:00 -06:00
.version Impala makes packaging a life-long addiction 2017-08-30 23:13:56 +02:00
COPYING 2018 will be the year of NixOS 2018-01-04 17:59:52 -05:00
default.nix default.nix: Provide correct instructions how to upgrade Nix 2017-03-18 21:04:07 +02:00
README.md README: Use HTTPS for all hyperlinks 2017-11-22 19:51:40 +01:00

logo

Code Triagers Badge

Nixpkgs is a collection of packages for the Nix package manager. It is periodically built and tested by the Hydra build daemon as so-called channels. To get channel information via git, add nixpkgs-channels as a remote:

% git remote add channels git://github.com/NixOS/nixpkgs-channels.git

For stability and maximum binary package support, it is recommended to maintain custom changes on top of one of the channels, e.g. nixos-17.09 for the latest release and nixos-unstable for the latest successful build of master:

% git remote update channels
% git rebase channels/nixos-17.09

For pull-requests, please rebase onto nixpkgs master.

NixOS Linux distribution source code is located inside nixos/ folder.

Communication: