Update installer bootloader configuration

This commit is contained in:
Michael Smith 2024-09-03 14:45:08 +02:00
parent 3a04e348ee
commit 0b0939f879
2 changed files with 15 additions and 34 deletions

View File

@ -21,7 +21,17 @@ in {
(modulesPath + "/profiles/installation-device.nix") (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 # Adds terminus_font for people with HiDPI displays
console.packages = options.console.packages.default ++ [pkgs.terminus_font]; console.packages = options.console.packages.default ++ [pkgs.terminus_font];
@ -32,12 +42,6 @@ in {
# ISO naming. # ISO naming.
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso"; 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 # An installation media cannot tolerate a host config defined file
# system layout on a fresh machine, before it has been formatted. # system layout on a fresh machine, before it has been formatted.
swapDevices = mkImageMediaOverride []; swapDevices = mkImageMediaOverride [];
@ -93,9 +97,6 @@ in {
# which lags behind kernel releases, potentially causing broken builds. # which lags behind kernel releases, potentially causing broken builds.
virtualisation.virtualbox.guest.enable = false; virtualisation.virtualbox.guest.enable = false;
# Enable plymouth
boot.plymouth.enable = true;
environment.defaultPackages = with pkgs; [ environment.defaultPackages = with pkgs; [
# Include gparted for partitioning disks. # Include gparted for partitioning disks.
gparted gparted

View File

@ -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 { isoImage.efiSplashImage = mkOption {
default = pkgs.fetchurl { default = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/a9e05d7deb38a8e005a2b52575a3f59a63a4dba0/bootloader/efi-background.png"; url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/a9e05d7deb38a8e005a2b52575a3f59a63a4dba0/bootloader/efi-background.png";
@ -827,8 +811,6 @@ in {
source = "${pkgs.syslinux}/share/syslinux"; source = "${pkgs.syslinux}/share/syslinux";
target = "/isolinux"; target = "/isolinux";
} }
]
++ optionals config.isoImage.makeEfiBootable [
{ {
source = efiImg; source = efiImg;
target = "/boot/efi.img"; target = "/boot/efi.img";
@ -872,14 +854,12 @@ in {
else null; else null;
squashfsContents = config.isoImage.storeContents; squashfsContents = config.isoImage.storeContents;
squashfsCompression = config.isoImage.squashfsCompression; 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; efiBootable = true;
efiBootImage = "boot/efi.img"; efiBootImage = "boot/efi.img";
}
// optionalAttrs (config.isoImage.makeBiosBootable) {
usbBootable = true;
isohybridMbrImage = "${pkgs.syslinux}/share/syslinux/isohdpfx.bin";
}); });
boot.postBootCommands = '' boot.postBootCommands = ''