diff options
-rw-r--r-- | nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix | 21 | ||||
-rw-r--r-- | nixos/tests/systemd-boot.nix | 10 |
2 files changed, 10 insertions, 21 deletions
diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix index 8a3e89e5888bc..1770f0759434d 100644 --- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix +++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix @@ -32,7 +32,7 @@ let inherit (config.system.nixos) distroName; - memtest86 = optionalString cfg.memtest86.enable pkgs.memtest86-efi; + memtest86 = optionalString cfg.memtest86.enable pkgs.memtest86plus; netbootxyz = optionalString cfg.netbootxyz.enable pkgs.netbootxyz-efi; @@ -147,10 +147,8 @@ in { default = false; type = types.bool; description = lib.mdDoc '' - Make MemTest86 available from the systemd-boot menu. MemTest86 is a - program for testing memory. MemTest86 is an unfree program, so - this requires `allowUnfree` to be set to - `true`. + Make MemTest86+ available from the systemd-boot menu. MemTest86+ is a + program for testing memory. ''; }; @@ -193,8 +191,8 @@ in { default = {}; example = literalExpression '' { "memtest86.conf" = ''' - title MemTest86 - efi /efi/memtest86/memtest86.efi + title MemTest86+ + efi /efi/memtest86/memtest.efi '''; } ''; description = lib.mdDoc '' @@ -213,7 +211,7 @@ in { type = types.attrsOf types.path; default = {}; example = literalExpression '' - { "efi/memtest86/memtest86.efi" = "''${pkgs.memtest86-efi}/BOOTX64.efi"; } + { "efi/memtest86/memtest.efi" = "''${pkgs.memtest86plus}/memtest.efi"; } ''; description = lib.mdDoc '' A set of files to be copied to {file}`/boot`. @@ -276,11 +274,8 @@ in { boot.loader.supportsInitrdSecrets = true; boot.loader.systemd-boot.extraFiles = mkMerge [ - # TODO: This is hard-coded to use the 64-bit EFI app, but it could probably - # be updated to use the 32-bit EFI app on 32-bit systems. The 32-bit EFI - # app filename is BOOTIA32.efi. (mkIf cfg.memtest86.enable { - "efi/memtest86/BOOTX64.efi" = "${pkgs.memtest86-efi}/BOOTX64.efi"; + "efi/memtest86/memtest.efi" = "${pkgs.memtest86plus.efi}"; }) (mkIf cfg.netbootxyz.enable { "efi/netbootxyz/netboot.xyz.efi" = "${pkgs.netbootxyz-efi}"; @@ -291,7 +286,7 @@ in { (mkIf cfg.memtest86.enable { "${cfg.memtest86.entryFilename}" = '' title MemTest86 - efi /efi/memtest86/BOOTX64.efi + efi /efi/memtest86/memtest.efi ''; }) (mkIf cfg.netbootxyz.enable { diff --git a/nixos/tests/systemd-boot.nix b/nixos/tests/systemd-boot.nix index 84a4da5aa6ec5..c1f8637989e39 100644 --- a/nixos/tests/systemd-boot.nix +++ b/nixos/tests/systemd-boot.nix @@ -118,14 +118,11 @@ in nodes.machine = { pkgs, lib, ... }: { imports = [ common ]; boot.loader.systemd-boot.memtest86.enable = true; - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "memtest86-efi" - ]; }; testScript = '' machine.succeed("test -e /boot/loader/entries/memtest86.conf") - machine.succeed("test -e /boot/efi/memtest86/BOOTX64.efi") + machine.succeed("test -e /boot/efi/memtest86/memtest.efi") ''; }; @@ -152,15 +149,12 @@ in imports = [ common ]; boot.loader.systemd-boot.memtest86.enable = true; boot.loader.systemd-boot.memtest86.entryFilename = "apple.conf"; - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "memtest86-efi" - ]; }; testScript = '' machine.fail("test -e /boot/loader/entries/memtest86.conf") machine.succeed("test -e /boot/loader/entries/apple.conf") - machine.succeed("test -e /boot/efi/memtest86/BOOTX64.efi") + machine.succeed("test -e /boot/efi/memtest86/memtest.efi") ''; }; |