diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-11-20 14:32:58 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-11-20 14:32:58 +0100 |
commit | 333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb (patch) | |
tree | 0f4757ddd2bb3d73b438eea85828d8e01c049583 /nixos/modules/services/hardware | |
parent | bdbbfa0d4247e203ffe3171621b614374da05f70 (diff) | |
parent | b809f886c0bdbd4665fc65a4c308d38a30c368d8 (diff) | |
download | nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.gz nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.bz2 nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.lz nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.xz nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.zst nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.zip |
Merge staging into closure-size
The most complex problems were from dealing with switches reverted in the meantime (gcc5, gmp6, ncurses6). It's likely that darwin is (still) broken nontrivially.
Diffstat (limited to 'nixos/modules/services/hardware')
-rw-r--r-- | nixos/modules/services/hardware/actkbd.nix | 3 | ||||
-rw-r--r-- | nixos/modules/services/hardware/tlp.nix | 24 |
2 files changed, 23 insertions, 4 deletions
diff --git a/nixos/modules/services/hardware/actkbd.nix b/nixos/modules/services/hardware/actkbd.nix index 82de362c371b..b16a8f50a3d8 100644 --- a/nixos/modules/services/hardware/actkbd.nix +++ b/nixos/modules/services/hardware/actkbd.nix @@ -125,6 +125,9 @@ in }; }; + # For testing + environment.systemPackages = [ pkgs.actkbd ]; + }; } diff --git a/nixos/modules/services/hardware/tlp.nix b/nixos/modules/services/hardware/tlp.nix index f221c82e2eda..23b6edcefd1a 100644 --- a/nixos/modules/services/hardware/tlp.nix +++ b/nixos/modules/services/hardware/tlp.nix @@ -6,9 +6,23 @@ let cfg = config.services.tlp; -tlp = pkgs.tlp.override { kmod = config.system.sbin.modprobe; }; - -confFile = pkgs.writeText "tlp" (builtins.readFile "${tlp}/etc/default/tlp" + cfg.extraConfig); +enableRDW = config.networking.networkmanager.enable; + +tlp = pkgs.tlp.override { + inherit enableRDW; + kmod = config.system.sbin.modprobe; +}; + +# XXX: We can't use writeTextFile + readFile here because it triggers +# TLP build to get the .drv (even on --dry-run). +confFile = pkgs.runCommand "tlp" + { config = cfg.extraConfig; + passAsFile = [ "config" ]; + } + '' + cat ${tlp}/etc/default/tlp > $out + cat $configPath >> $out + ''; in @@ -81,13 +95,15 @@ in environment.etc = [{ source = confFile; target = "default/tlp"; } - ] ++ optional tlp.enableRDW { + ] ++ optional enableRDW { source = "${tlp}/etc/NetworkManager/dispatcher.d/99tlp-rdw-nm"; target = "NetworkManager/dispatcher.d/99tlp-rdw-nm"; }; environment.systemPackages = [ tlp ]; + boot.kernelModules = [ "msr" ]; + }; } |