Merge pull request #7507 from trofi/use-nix-settings-in-tests

tests: switch to non-deprecated nix.settings.* module parameters
This commit is contained in:
Théophane Hufschmitt 2023-01-02 11:49:12 +01:00 committed by GitHub
commit e7f2f70750
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 11 deletions

View file

@ -20,7 +20,7 @@ makeTest ({
(import ./systemd-nspawn.nix { inherit nixpkgs; }).toplevel (import ./systemd-nspawn.nix { inherit nixpkgs; }).toplevel
]; ];
virtualisation.memorySize = 4096; virtualisation.memorySize = 4096;
nix.binaryCaches = lib.mkForce [ ]; nix.settings.substituters = lib.mkForce [ ];
nix.extraOptions = nix.extraOptions =
'' ''
extra-experimental-features = nix-command auto-allocate-uids cgroups extra-experimental-features = nix-command auto-allocate-uids cgroups

View file

@ -149,7 +149,7 @@ makeTest (
virtualisation.diskSize = 2048; virtualisation.diskSize = 2048;
virtualisation.additionalPaths = [ pkgs.hello pkgs.fuse ]; virtualisation.additionalPaths = [ pkgs.hello pkgs.fuse ];
virtualisation.memorySize = 4096; virtualisation.memorySize = 4096;
nix.binaryCaches = lib.mkForce [ ]; nix.settings.substituters = lib.mkForce [ ];
nix.extraOptions = "experimental-features = nix-command flakes"; nix.extraOptions = "experimental-features = nix-command flakes";
networking.hosts.${(builtins.head nodes.github.config.networking.interfaces.eth1.ipv4.addresses).address} = networking.hosts.${(builtins.head nodes.github.config.networking.interfaces.eth1.ipv4.addresses).address} =
[ "channels.nixos.org" "api.github.com" "github.com" ]; [ "channels.nixos.org" "api.github.com" "github.com" ];

View file

@ -15,7 +15,7 @@ makeTest (let pkgA = pkgs.cowsay; pkgB = pkgs.wget; pkgC = pkgs.hello; pkgD = pk
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ virtualisation.writableStore = true; { virtualisation.writableStore = true;
virtualisation.additionalPaths = [ pkgA pkgD.drvPath ]; virtualisation.additionalPaths = [ pkgA pkgD.drvPath ];
nix.binaryCaches = lib.mkForce [ ]; nix.settings.substituters = lib.mkForce [ ];
}; };
server = server =

View file

@ -98,9 +98,9 @@ rec {
{ address = "192.168.0.10"; prefixLength = 24; } { address = "192.168.0.10"; prefixLength = 24; }
]; ];
nix.sandboxPaths = lib.mkForce []; nix.settings.extra-sandbox-paths = lib.mkForce [];
nix.binaryCaches = lib.mkForce []; nix.settings.substituters = lib.mkForce [];
nix.useSandbox = lib.mkForce true; nix.settings.sandbox = lib.mkForce true;
}; };
}; };

View file

@ -16,7 +16,7 @@ let
{ config, pkgs, ... }: { config, pkgs, ... }:
{ services.openssh.enable = true; { services.openssh.enable = true;
virtualisation.writableStore = true; virtualisation.writableStore = true;
nix.useSandbox = true; nix.settings.sandbox = true;
}; };
# Trivial Nix expression to build remotely. # Trivial Nix expression to build remotely.
@ -44,7 +44,7 @@ in
client = client =
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ nix.maxJobs = 0; # force remote building { nix.settings.max-jobs = 0; # force remote building
nix.distributedBuilds = true; nix.distributedBuilds = true;
nix.buildMachines = nix.buildMachines =
[ { hostName = "builder1"; [ { hostName = "builder1";
@ -62,7 +62,7 @@ in
]; ];
virtualisation.writableStore = true; virtualisation.writableStore = true;
virtualisation.additionalPaths = [ config.system.build.extraUtils ]; virtualisation.additionalPaths = [ config.system.build.extraUtils ];
nix.binaryCaches = lib.mkForce [ ]; nix.settings.substituters = lib.mkForce [ ];
programs.ssh.extraConfig = "ConnectTimeout 30"; programs.ssh.extraConfig = "ConnectTimeout 30";
}; };
}; };

View file

@ -13,7 +13,7 @@ makeTest {
nodes.machine = nodes.machine =
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ virtualisation.writableStore = true; { virtualisation.writableStore = true;
nix.binaryCaches = lib.mkForce [ ]; nix.settings.substituters = lib.mkForce [ ];
nix.nixPath = [ "nixpkgs=${lib.cleanSource pkgs.path}" ]; nix.nixPath = [ "nixpkgs=${lib.cleanSource pkgs.path}" ];
virtualisation.additionalPaths = [ pkgs.stdenv pkgs.pkgsi686Linux.stdenv ]; virtualisation.additionalPaths = [ pkgs.stdenv pkgs.pkgsi686Linux.stdenv ];
}; };

View file

@ -108,7 +108,7 @@ makeTest (
virtualisation.diskSize = 2048; virtualisation.diskSize = 2048;
virtualisation.additionalPaths = [ pkgs.hello pkgs.fuse ]; virtualisation.additionalPaths = [ pkgs.hello pkgs.fuse ];
virtualisation.memorySize = 4096; virtualisation.memorySize = 4096;
nix.binaryCaches = lib.mkForce [ ]; nix.settings.substituters = lib.mkForce [ ];
nix.extraOptions = '' nix.extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
flake-registry = https://git.sr.ht/~NixOS/flake-registry/blob/master/flake-registry.json flake-registry = https://git.sr.ht/~NixOS/flake-registry/blob/master/flake-registry.json