mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 13:08:39 +03:00
nixos/tlp: workaround early build trigger
This commit is contained in:
parent
43147bedab
commit
452dbfd288
@ -8,7 +8,16 @@ cfg = config.services.tlp;
|
|||||||
|
|
||||||
tlp = pkgs.tlp.override { kmod = config.system.sbin.modprobe; };
|
tlp = pkgs.tlp.override { kmod = config.system.sbin.modprobe; };
|
||||||
|
|
||||||
confFile = pkgs.writeText "tlp" (builtins.readFile "${tlp}/etc/default/tlp" + cfg.extraConfig);
|
# 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
|
in
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user