Loading nixos/modules/system/boot/loader/limine/limine-install.py +3 −3 Original line number Diff line number Diff line Loading @@ -492,12 +492,12 @@ def install_bootloader() -> None: config_file += option_from_config('term_margin_gradient', ['style', 'graphicalTerminal', 'marginGradient']) config_file += textwrap.dedent(''' # NixOS boot entries start here # @distroName@ boot entries start here ''') for (profile, gens) in profiles: group_name = 'default profile' if profile == 'system' else f"profile '{profile}'" config_file += f'/+NixOS {group_name}\n' config_file += f'/+@distroName@ {group_name}\n' isFirst = True Loading @@ -506,7 +506,7 @@ def install_bootloader() -> None: isFirst = False config_file_path = os.path.join(limine_install_dir, 'limine.conf') config_file += '\n# NixOS boot entries end here\n\n' config_file += '\n# @distroName@ boot entries end here\n\n' config_file += str(config('extraEntries')) Loading nixos/modules/system/boot/loader/limine/limine.nix +1 −0 Original line number Diff line number Diff line Loading @@ -432,6 +432,7 @@ in replacements = { python3 = pkgs.python3.withPackages (python-packages: [ python-packages.psutil ]); configPath = limineInstallConfig; inherit (config.system.nixos) distroName; }; }; }; Loading nixos/tests/limine/default.nix +1 −0 Original line number Diff line number Diff line Loading @@ -8,4 +8,5 @@ secureBoot = runTest ./secure-boot.nix; specialisations = runTest ./specialisations.nix; uefi = runTest ./uefi.nix; distroName = runTest ./distroName.nix; } nixos/tests/limine/distroName.nix 0 → 100644 +30 −0 Original line number Diff line number Diff line { pkgs, ... }: { name = "distroName"; meta = { inherit (pkgs.limine.meta) maintainers; }; nodes.machine = { ... }: { virtualisation.useBootLoader = true; virtualisation.useEFIBoot = true; boot.loader.efi.canTouchEfiVariables = true; boot.loader.limine.enable = true; boot.loader.limine.efiSupport = true; boot.loader.timeout = 0; system.nixos.distroName = "BestDistroEver"; }; testScript = /* python */ '' machine.start() with subtest('Machine boots correctly'): machine.wait_for_unit('multi-user.target') machine.succeed("grep \"BestDistroEver\" /boot/limine/limine.conf") machine.fail("grep \"NixOS\" /boot/limine/limine.conf") ''; } Loading
nixos/modules/system/boot/loader/limine/limine-install.py +3 −3 Original line number Diff line number Diff line Loading @@ -492,12 +492,12 @@ def install_bootloader() -> None: config_file += option_from_config('term_margin_gradient', ['style', 'graphicalTerminal', 'marginGradient']) config_file += textwrap.dedent(''' # NixOS boot entries start here # @distroName@ boot entries start here ''') for (profile, gens) in profiles: group_name = 'default profile' if profile == 'system' else f"profile '{profile}'" config_file += f'/+NixOS {group_name}\n' config_file += f'/+@distroName@ {group_name}\n' isFirst = True Loading @@ -506,7 +506,7 @@ def install_bootloader() -> None: isFirst = False config_file_path = os.path.join(limine_install_dir, 'limine.conf') config_file += '\n# NixOS boot entries end here\n\n' config_file += '\n# @distroName@ boot entries end here\n\n' config_file += str(config('extraEntries')) Loading
nixos/modules/system/boot/loader/limine/limine.nix +1 −0 Original line number Diff line number Diff line Loading @@ -432,6 +432,7 @@ in replacements = { python3 = pkgs.python3.withPackages (python-packages: [ python-packages.psutil ]); configPath = limineInstallConfig; inherit (config.system.nixos) distroName; }; }; }; Loading
nixos/tests/limine/default.nix +1 −0 Original line number Diff line number Diff line Loading @@ -8,4 +8,5 @@ secureBoot = runTest ./secure-boot.nix; specialisations = runTest ./specialisations.nix; uefi = runTest ./uefi.nix; distroName = runTest ./distroName.nix; }
nixos/tests/limine/distroName.nix 0 → 100644 +30 −0 Original line number Diff line number Diff line { pkgs, ... }: { name = "distroName"; meta = { inherit (pkgs.limine.meta) maintainers; }; nodes.machine = { ... }: { virtualisation.useBootLoader = true; virtualisation.useEFIBoot = true; boot.loader.efi.canTouchEfiVariables = true; boot.loader.limine.enable = true; boot.loader.limine.efiSupport = true; boot.loader.timeout = 0; system.nixos.distroName = "BestDistroEver"; }; testScript = /* python */ '' machine.start() with subtest('Machine boots correctly'): machine.wait_for_unit('multi-user.target') machine.succeed("grep \"BestDistroEver\" /boot/limine/limine.conf") machine.fail("grep \"NixOS\" /boot/limine/limine.conf") ''; }