From 0cc1634b9ff7bd177b48e77c010a572f8ad6812b Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Thu, 5 Jun 2025 18:44:32 -0700 Subject: [PATCH] nixos/tests/refind: init test --- nixos/tests/all-tests.nix | 1 + nixos/tests/refind.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 nixos/tests/refind.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index a50c15852666..2b435d699dbd 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1291,6 +1291,7 @@ in redis = handleTest ./redis.nix { }; redlib = runTest ./redlib.nix; redmine = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./redmine.nix { }; + refind = runTest ./refind.nix; renovate = runTest ./renovate.nix; replace-dependencies = handleTest ./replace-dependencies { }; reposilite = runTest ./reposilite.nix; diff --git a/nixos/tests/refind.nix b/nixos/tests/refind.nix new file mode 100644 index 000000000000..9cb36f0b6035 --- /dev/null +++ b/nixos/tests/refind.nix @@ -0,0 +1,25 @@ +{ lib, pkgs, ... }: +{ + name = "refind"; + meta = { + inherit (pkgs.refind.meta) maintainers; + }; + + nodes.machine = + { ... }: + { + virtualisation.useBootLoader = true; + virtualisation.useEFIBoot = true; + + boot.loader.grub.enable = false; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.refind.enable = true; + boot.loader.timeout = 1; + }; + + testScript = '' + machine.start() + with subtest('Machine boots correctly'): + machine.wait_for_unit('multi-user.target') + ''; +}