tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/tlp: workaround early build trigger
Nikolay Amiantov
10 years ago
452dbfd2
43147bed
+10
-1
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
hardware
tlp.nix
+10
-1
nixos/modules/services/hardware/tlp.nix
···
8
8
9
9
tlp = pkgs.tlp.override { kmod = config.system.sbin.modprobe; };
10
10
11
11
-
confFile = pkgs.writeText "tlp" (builtins.readFile "${tlp}/etc/default/tlp" + cfg.extraConfig);
11
11
+
# XXX: We can't use writeTextFile + readFile here because it triggers
12
12
+
# TLP build to get the .drv (even on --dry-run).
13
13
+
confFile = pkgs.runCommand "tlp"
14
14
+
{ config = cfg.extraConfig;
15
15
+
passAsFile = [ "config" ];
16
16
+
}
17
17
+
''
18
18
+
cat ${tlp}/etc/default/tlp > $out
19
19
+
cat $configPath >> $out
20
20
+
'';
12
21
13
22
in
14
23