mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
Merge pull request #69868 from Infinisil/config-check-warning
nixos/nix-daemon: Prevent network warning when checking config
This commit is contained in:
commit
899937e1ca
@ -11,6 +11,7 @@ let
|
||||
nixVersion = getVersion nix;
|
||||
|
||||
isNix20 = versionAtLeast nixVersion "2.0pre";
|
||||
isNix23 = versionAtLeast nixVersion "2.3pre";
|
||||
|
||||
makeNixBuildUser = nr:
|
||||
{ name = "nixbld${toString nr}";
|
||||
@ -63,7 +64,7 @@ let
|
||||
builders =
|
||||
''}
|
||||
system-features = ${toString cfg.systemFeatures}
|
||||
${optionalString (versionAtLeast nixVersion "2.3pre") ''
|
||||
${optionalString isNix23 ''
|
||||
sandbox-fallback = false
|
||||
''}
|
||||
$extraOptions
|
||||
@ -74,7 +75,7 @@ let
|
||||
'' else ''
|
||||
echo "Checking that Nix can read nix.conf..."
|
||||
ln -s $out ./nix.conf
|
||||
NIX_CONF_DIR=$PWD ${cfg.package}/bin/nix show-config >/dev/null
|
||||
NIX_CONF_DIR=$PWD ${cfg.package}/bin/nix show-config ${optionalString isNix23 "--no-net"} >/dev/null
|
||||
'')
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user