summary refs log tree commit diff
path: root/nixos/tests/kexec.nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2022-06-09 19:59:03 +0200
committerFlorian Klink <flokli@flokli.de>2022-06-09 19:59:03 +0200
commit50648f568d2c988dc53d4ea82da622eca0fe3dd7 (patch)
treec6aaa8f7dc1eba796eb9215908d9537943bfe2c6 /nixos/tests/kexec.nix
parent4a5549783e71d3c24163be126d72f774e8436e8c (diff)
nixos/…/kexec-boot.nix: move into netboot.nix, rename to kexecTree
`nixos/modules/installer/kexec/kexec-boot.nix` doesn't contain any
custom NixOS config, other than importing `netboot-minimal.nix` (which
imports `netboot-base.nix`, which imports `netboot.nix`.

`netboot.nix` really is just describing a self-contained system config,
running entirely off kernel and initrd, so we might as well move the
kexec script generation there as well.

`netboot.nix` already contains some `system.build` attributes.
Provide a `system.build.kexecTree` attribute (and `kexecScript` for
composability).
Diffstat (limited to 'nixos/tests/kexec.nix')
-rw-r--r--nixos/tests/kexec.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/nixos/tests/kexec.nix b/nixos/tests/kexec.nix
index 7238a9f58e09e..3f5a6f521af0a 100644
--- a/nixos/tests/kexec.nix
+++ b/nixos/tests/kexec.nix
@@ -18,8 +18,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
       virtualisation.vlans = [ ];
       environment.systemPackages = [ pkgs.hello ];
       imports = [
-        "${modulesPath}/installer/kexec/kexec-boot.nix"
-        "${modulesPath}/profiles/minimal.nix"
+        "${modulesPath}/installer/netboot/netboot-minimal.nix"
       ];
     };
   };
@@ -33,14 +32,14 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
     node1.connect()
     node1.wait_for_unit("multi-user.target")
 
-    # Check if the machine with kexec-boot.nix profile boots up
+    # Check if the machine with netboot-minimal.nix profile boots up
     node2.wait_for_unit("multi-user.target")
     node2.shutdown()
 
     # Kexec node1 to the toplevel of node2 via the kexec-boot script
     node1.succeed('touch /run/foo')
     node1.fail('hello')
-    node1.execute('${nodes.node2.config.system.build.kexecBoot}/kexec-boot', check_return=False)
+    node1.execute('${nodes.node2.config.system.build.kexecTree}/kexec-boot', check_return=False)
     node1.succeed('! test -e /run/foo')
     node1.succeed('hello')
     node1.succeed('[ "$(hostname)" = "node2" ]')