diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-07 15:01:36 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-09 15:10:37 +0200 |
commit | dc626693352250f21f0d2c6492757e6a916bcfc6 (patch) | |
tree | 27e18e5b1970524e942ef958204206be341ffd6c /nixos/modules/system/boot/systemd-lib.nix | |
parent | 4d49006a0f8ebdf32416779167bcb783834f9629 (diff) | |
download | nixpkgs-dc626693352250f21f0d2c6492757e6a916bcfc6.tar nixpkgs-dc626693352250f21f0d2c6492757e6a916bcfc6.tar.gz nixpkgs-dc626693352250f21f0d2c6492757e6a916bcfc6.tar.bz2 nixpkgs-dc626693352250f21f0d2c6492757e6a916bcfc6.tar.lz nixpkgs-dc626693352250f21f0d2c6492757e6a916bcfc6.tar.xz nixpkgs-dc626693352250f21f0d2c6492757e6a916bcfc6.tar.zst nixpkgs-dc626693352250f21f0d2c6492757e6a916bcfc6.zip |
Set ‘allowSubstitutes = false’ on various derivations
This reduces the number of binary cache requests. See https://github.com/NixOS/nix/commit/b64988bb3585478676585a0f0aecbcf4e11d4432.
Diffstat (limited to 'nixos/modules/system/boot/systemd-lib.nix')
-rw-r--r-- | nixos/modules/system/boot/systemd-lib.nix | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/systemd-lib.nix b/nixos/modules/system/boot/systemd-lib.nix index 873fff15d38..8acaa5212f5 100644 --- a/nixos/modules/system/boot/systemd-lib.nix +++ b/nixos/modules/system/boot/systemd-lib.nix @@ -13,13 +13,20 @@ rec { pathSafeName = lib.replaceChars ["@" ":" "\\"] ["-" "-" "-"] name; in if unit.enable then - pkgs.runCommand "unit-${pathSafeName}" { preferLocalBuild = true; inherit (unit) text; } + pkgs.runCommand "unit-${pathSafeName}" + { preferLocalBuild = true; + allowSubstitutes = false; + inherit (unit) text; + } '' mkdir -p $out echo -n "$text" > $out/${shellEscape name} '' else - pkgs.runCommand "unit-${pathSafeName}-disabled" { preferLocalBuild = true; } + pkgs.runCommand "unit-${pathSafeName}-disabled" + { preferLocalBuild = true; + allowSubstitutes = false; + } '' mkdir -p $out ln -s /dev/null $out/${shellEscape name} @@ -89,7 +96,10 @@ rec { as)); generateUnits = type: units: upstreamUnits: upstreamWants: - pkgs.runCommand "${type}-units" { preferLocalBuild = true; } '' + pkgs.runCommand "${type}-units" + { preferLocalBuild = true; + allowSubstitutes = false; + } '' mkdir -p $out # Copy the upstream systemd units we're interested in. |