summaryrefslogtreecommitdiffstats
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorSymphorien Gibol <symphorien+git@xlumurb.eu>2018-11-08 11:59:03 +0100
committernix-review <nix-review@example.com>2019-02-22 20:11:27 +0100
commita915b33315946b9e7d164d57812ee16172ad65df (patch)
treec87f6d3bb162737257923a6d917f72f6db77bb45 /nixos/modules/system
parent2a81eceeba6d9b0499c0a9dc569921765321cdd0 (diff)
nixos: add preferLocalBuild=true; on derivations for config files
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/stage-1.nix14
-rw-r--r--nixos/modules/system/boot/systemd.nix5
2 files changed, 12 insertions, 7 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
index 5e27b24ac447..9984a97bbdd2 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -196,9 +196,10 @@ let
''; # */
- udevRules = pkgs.runCommand "udev-rules"
- { allowedReferences = [ extraUtils ]; }
- ''
+ udevRules = pkgs.runCommand "udev-rules" {
+ allowedReferences = [ extraUtils ];
+ preferLocalBuild = true;
+ } ''
mkdir -p $out
echo 'ENV{LD_LIBRARY_PATH}="${extraUtils}/lib"' > $out/00-env.rules
@@ -298,9 +299,10 @@ let
{ object = pkgs.writeText "mdadm.conf" config.boot.initrd.mdadmConf;
symlink = "/etc/mdadm.conf";
}
- { object = pkgs.runCommand "initrd-kmod-blacklist-ubuntu"
- { src = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf"; }
- ''
+ { object = pkgs.runCommand "initrd-kmod-blacklist-ubuntu" {
+ src = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf";
+ preferLocalBuild = true;
+ } ''
target=$out
${pkgs.buildPackages.perl}/bin/perl -0pe 's/## file: iwlwifi.conf(.+?)##/##/s;' $src > $out
'';
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index 9fdef0251d70..bf1b1b417b16 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -759,7 +759,10 @@ in
environment.etc = let
# generate contents for /etc/systemd/system-generators from
# systemd.generators and systemd.generator-packages
- generators = pkgs.runCommand "system-generators" { packages = cfg.generator-packages; } ''
+ generators = pkgs.runCommand "system-generators" {
+ preferLocalBuild = true;
+ packages = cfg.generator-packages;
+ } ''
mkdir -p $out
for package in $packages
do