From 0b0939f8799c5d46eab2763f3c2de169d3032cf0 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 3 Sep 2024 14:45:08 +0200 Subject: [PATCH] Update installer bootloader configuration --- modules/installer/default.nix | 21 +++++++++++---------- modules/installer/iso-image.nix | 28 ++++------------------------ 2 files changed, 15 insertions(+), 34 deletions(-) diff --git a/modules/installer/default.nix b/modules/installer/default.nix index 6b5c751..228d911 100644 --- a/modules/installer/default.nix +++ b/modules/installer/default.nix @@ -21,7 +21,17 @@ in { (modulesPath + "/profiles/installation-device.nix") ]; - # boot.loader.timeout = lib.mkForce 0; + boot = { + consoleLogLevel = 0; + kernelParams = ["quiet"]; + initrd.verbose = false; + loader.systemd-boot.enable = true; + loader.timeout = lib.mkForce 0; + plymouth = { + enable = true; + theme = "breeze"; + }; + }; # Adds terminus_font for people with HiDPI displays console.packages = options.console.packages.default ++ [pkgs.terminus_font]; @@ -32,12 +42,6 @@ in { # ISO naming. isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso"; - # EFI booting - isoImage.makeEfiBootable = true; - - # USB booting - isoImage.makeUsbBootable = true; - # An installation media cannot tolerate a host config defined file # system layout on a fresh machine, before it has been formatted. swapDevices = mkImageMediaOverride []; @@ -93,9 +97,6 @@ in { # which lags behind kernel releases, potentially causing broken builds. virtualisation.virtualbox.guest.enable = false; - # Enable plymouth - boot.plymouth.enable = true; - environment.defaultPackages = with pkgs; [ # Include gparted for partitioning disks. gparted diff --git a/modules/installer/iso-image.nix b/modules/installer/iso-image.nix index 7b663ae..c6ebb70 100644 --- a/modules/installer/iso-image.nix +++ b/modules/installer/iso-image.nix @@ -566,22 +566,6 @@ in { ''; }; - isoImage.makeEfiBootable = mkOption { - default = false; - type = lib.types.bool; - description = '' - Whether the ISO image should be an EFI-bootable volume. - ''; - }; - - isoImage.makeUsbBootable = mkOption { - default = false; - type = lib.types.bool; - description = '' - Whether the ISO image should be bootable from CD as well as USB. - ''; - }; - isoImage.efiSplashImage = mkOption { default = pkgs.fetchurl { url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/a9e05d7deb38a8e005a2b52575a3f59a63a4dba0/bootloader/efi-background.png"; @@ -827,8 +811,6 @@ in { source = "${pkgs.syslinux}/share/syslinux"; target = "/isolinux"; } - ] - ++ optionals config.isoImage.makeEfiBootable [ { source = efiImg; target = "/boot/efi.img"; @@ -872,14 +854,12 @@ in { else null; squashfsContents = config.isoImage.storeContents; squashfsCompression = config.isoImage.squashfsCompression; - } - // optionalAttrs (config.isoImage.makeUsbBootable && config.isoImage.makeBiosBootable) { - usbBootable = true; - isohybridMbrImage = "${pkgs.syslinux}/share/syslinux/isohdpfx.bin"; - } - // optionalAttrs config.isoImage.makeEfiBootable { efiBootable = true; efiBootImage = "boot/efi.img"; + } + // optionalAttrs (config.isoImage.makeBiosBootable) { + usbBootable = true; + isohybridMbrImage = "${pkgs.syslinux}/share/syslinux/isohdpfx.bin"; }); boot.postBootCommands = ''