Merge pull request #237063 from roberth/fix-systemd-boot-test

nixos: Fix systemd-boot test
This commit is contained in:
Robert Hensing 2023-06-10 19:10:05 +02:00 committed by GitHub
commit 493b08c410
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -207,11 +207,17 @@ in
nodes = { nodes = {
inherit common; inherit common;
machine = { pkgs, ... }: { machine = { pkgs, nodes, ... }: {
imports = [ common ]; imports = [ common ];
boot.loader.systemd-boot.extraFiles = { boot.loader.systemd-boot.extraFiles = {
"efi/fruits/tomato.efi" = pkgs.netbootxyz-efi; "efi/fruits/tomato.efi" = pkgs.netbootxyz-efi;
}; };
# These are configs for different nodes, but we'll use them here in `machine`
system.extraDependencies = [
nodes.common.system.build.toplevel
nodes.with_netbootxyz.system.build.toplevel
];
}; };
with_netbootxyz = { pkgs, ... }: { with_netbootxyz = { pkgs, ... }: {
@ -221,9 +227,9 @@ in
}; };
testScript = { nodes, ... }: let testScript = { nodes, ... }: let
originalSystem = nodes.machine.config.system.build.toplevel; originalSystem = nodes.machine.system.build.toplevel;
baseSystem = nodes.common.config.system.build.toplevel; baseSystem = nodes.common.system.build.toplevel;
finalSystem = nodes.with_netbootxyz.config.system.build.toplevel; finalSystem = nodes.with_netbootxyz.system.build.toplevel;
in '' in ''
machine.succeed("test -e /boot/efi/fruits/tomato.efi") machine.succeed("test -e /boot/efi/fruits/tomato.efi")
machine.succeed("test -e /boot/efi/nixos/.extra-files/efi/fruits/tomato.efi") machine.succeed("test -e /boot/efi/nixos/.extra-files/efi/fruits/tomato.efi")