Loading nixos/tests/all-tests.nix +2 −2 Original line number Diff line number Diff line Loading @@ -699,8 +699,8 @@ in { nixops = handleTest ./nixops/default.nix {}; nixos-generate-config = handleTest ./nixos-generate-config.nix {}; nixos-rebuild-install-bootloader = handleTestOn ["x86_64-linux"] ./nixos-rebuild-install-bootloader.nix {}; nixos-rebuild-specialisations = handleTestOn ["x86_64-linux"] ./nixos-rebuild-specialisations.nix {}; nixos-rebuild-target-host = handleTest ./nixos-rebuild-target-host.nix {}; nixos-rebuild-specialisations = runTestOn ["x86_64-linux"] ./nixos-rebuild-specialisations.nix; nixos-rebuild-target-host = runTest ./nixos-rebuild-target-host.nix; nixpkgs = pkgs.callPackage ../modules/misc/nixpkgs/test.nix { inherit evalMinimalConfig; }; nixseparatedebuginfod = handleTest ./nixseparatedebuginfod.nix {}; node-red = handleTest ./node-red.nix {}; Loading nixos/tests/nixos-rebuild-specialisations.nix +7 −3 Original line number Diff line number Diff line import ./make-test-python.nix ({ pkgs, ... }: { { hostPkgs, ... }: { name = "nixos-rebuild-specialisations"; # TODO: remove overlay from nixos/modules/profiles/installation-device.nix # make it a _small package instead, then remove pkgsReadOnly = false;. node.pkgsReadOnly = false; nodes = { machine = { lib, pkgs, ... }: { imports = [ Loading Loading @@ -32,7 +36,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { testScript = let configFile = pkgs.writeText "configuration.nix" '' configFile = hostPkgs.writeText "configuration.nix" '' { lib, pkgs, ... }: { imports = [ ./hardware-configuration.nix Loading Loading @@ -119,4 +123,4 @@ import ./make-test-python.nix ({ pkgs, ... }: { machine.fail("nixos-rebuild boot --specialisation foo") machine.fail("nixos-rebuild boot -c foo") ''; }) } nixos/tests/nixos-rebuild-target-host.nix +13 −7 Original line number Diff line number Diff line import ./make-test-python.nix ({ pkgs, ... }: { { hostPkgs, ... }: { name = "nixos-rebuild-target-host"; # TODO: remove overlay from nixos/modules/profiles/installation-device.nix # make it a _small package instead, then remove pkgsReadOnly = false;. node.pkgsReadOnly = false; nodes = { deployer = { lib, ... }: let deployer = { lib, pkgs, ... }: let inherit (import ./ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey; in { imports = [ ../modules/profiles/installation-device.nix ]; Loading @@ -24,7 +28,8 @@ import ./make-test-python.nix ({ pkgs, ... }: { system.build.privateKey = snakeOilPrivateKey; system.build.publicKey = snakeOilPublicKey; # needed to provide STC implementation for target # We don't switch on `deployer`, but we need it to have the dependencies # available, to be picked up by system.includeBuildDependencies above. system.switch.enable = true; }; Loading Loading @@ -57,6 +62,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { system.build = { inherit targetConfig; }; system.switch.enable = true; networking.hostName = "target"; } Loading @@ -71,13 +77,13 @@ import ./make-test-python.nix ({ pkgs, ... }: { StrictHostKeyChecking=no ''; targetConfigJSON = pkgs.writeText "target-configuration.json" targetConfigJSON = hostPkgs.writeText "target-configuration.json" (builtins.toJSON nodes.target.system.build.targetConfig); targetNetworkJSON = pkgs.writeText "target-network.json" targetNetworkJSON = hostPkgs.writeText "target-network.json" (builtins.toJSON nodes.target.system.build.networkConfig); configFile = hostname: pkgs.writeText "configuration.nix" '' configFile = hostname: hostPkgs.writeText "configuration.nix" '' { lib, modulesPath, ... }: { imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") Loading Loading @@ -140,4 +146,4 @@ import ./make-test-python.nix ({ pkgs, ... }: { deployer.succeed(f"mkdir -p {tmp_dir}") deployer.succeed(f"TMPDIR={tmp_dir} nixos-rebuild switch -I nixos-config=/root/configuration-1.nix --target-host root@target &>/dev/console") ''; }) } Loading
nixos/tests/all-tests.nix +2 −2 Original line number Diff line number Diff line Loading @@ -699,8 +699,8 @@ in { nixops = handleTest ./nixops/default.nix {}; nixos-generate-config = handleTest ./nixos-generate-config.nix {}; nixos-rebuild-install-bootloader = handleTestOn ["x86_64-linux"] ./nixos-rebuild-install-bootloader.nix {}; nixos-rebuild-specialisations = handleTestOn ["x86_64-linux"] ./nixos-rebuild-specialisations.nix {}; nixos-rebuild-target-host = handleTest ./nixos-rebuild-target-host.nix {}; nixos-rebuild-specialisations = runTestOn ["x86_64-linux"] ./nixos-rebuild-specialisations.nix; nixos-rebuild-target-host = runTest ./nixos-rebuild-target-host.nix; nixpkgs = pkgs.callPackage ../modules/misc/nixpkgs/test.nix { inherit evalMinimalConfig; }; nixseparatedebuginfod = handleTest ./nixseparatedebuginfod.nix {}; node-red = handleTest ./node-red.nix {}; Loading
nixos/tests/nixos-rebuild-specialisations.nix +7 −3 Original line number Diff line number Diff line import ./make-test-python.nix ({ pkgs, ... }: { { hostPkgs, ... }: { name = "nixos-rebuild-specialisations"; # TODO: remove overlay from nixos/modules/profiles/installation-device.nix # make it a _small package instead, then remove pkgsReadOnly = false;. node.pkgsReadOnly = false; nodes = { machine = { lib, pkgs, ... }: { imports = [ Loading Loading @@ -32,7 +36,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { testScript = let configFile = pkgs.writeText "configuration.nix" '' configFile = hostPkgs.writeText "configuration.nix" '' { lib, pkgs, ... }: { imports = [ ./hardware-configuration.nix Loading Loading @@ -119,4 +123,4 @@ import ./make-test-python.nix ({ pkgs, ... }: { machine.fail("nixos-rebuild boot --specialisation foo") machine.fail("nixos-rebuild boot -c foo") ''; }) }
nixos/tests/nixos-rebuild-target-host.nix +13 −7 Original line number Diff line number Diff line import ./make-test-python.nix ({ pkgs, ... }: { { hostPkgs, ... }: { name = "nixos-rebuild-target-host"; # TODO: remove overlay from nixos/modules/profiles/installation-device.nix # make it a _small package instead, then remove pkgsReadOnly = false;. node.pkgsReadOnly = false; nodes = { deployer = { lib, ... }: let deployer = { lib, pkgs, ... }: let inherit (import ./ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey; in { imports = [ ../modules/profiles/installation-device.nix ]; Loading @@ -24,7 +28,8 @@ import ./make-test-python.nix ({ pkgs, ... }: { system.build.privateKey = snakeOilPrivateKey; system.build.publicKey = snakeOilPublicKey; # needed to provide STC implementation for target # We don't switch on `deployer`, but we need it to have the dependencies # available, to be picked up by system.includeBuildDependencies above. system.switch.enable = true; }; Loading Loading @@ -57,6 +62,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { system.build = { inherit targetConfig; }; system.switch.enable = true; networking.hostName = "target"; } Loading @@ -71,13 +77,13 @@ import ./make-test-python.nix ({ pkgs, ... }: { StrictHostKeyChecking=no ''; targetConfigJSON = pkgs.writeText "target-configuration.json" targetConfigJSON = hostPkgs.writeText "target-configuration.json" (builtins.toJSON nodes.target.system.build.targetConfig); targetNetworkJSON = pkgs.writeText "target-network.json" targetNetworkJSON = hostPkgs.writeText "target-network.json" (builtins.toJSON nodes.target.system.build.networkConfig); configFile = hostname: pkgs.writeText "configuration.nix" '' configFile = hostname: hostPkgs.writeText "configuration.nix" '' { lib, modulesPath, ... }: { imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") Loading Loading @@ -140,4 +146,4 @@ import ./make-test-python.nix ({ pkgs, ... }: { deployer.succeed(f"mkdir -p {tmp_dir}") deployer.succeed(f"TMPDIR={tmp_dir} nixos-rebuild switch -I nixos-config=/root/configuration-1.nix --target-host root@target &>/dev/console") ''; }) }