From e5b072eca165430efc4d7a179011a42aab4470a2 Mon Sep 17 00:00:00 2001 From: Ivan Trubach Date: Fri, 3 Mar 2023 02:31:38 +0300 Subject: [PATCH 1/3] nixos/iso-image: add an option to disable BIOS boot This change adds an option to disable legacy BIOS boot support for ISO images. The implementation uses syslinux package that currently does not support non-x86 platforms and thus cannot be cross-compiled, e.g. from AArch64 system. --- .../installer/cd-dvd/installation-cd-base.nix | 3 +++ nixos/modules/installer/cd-dvd/iso-image.nix | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/installation-cd-base.nix b/nixos/modules/installer/cd-dvd/installation-cd-base.nix index 3f92b779d60a..3c7c7e30a0bf 100644 --- a/nixos/modules/installer/cd-dvd/installation-cd-base.nix +++ b/nixos/modules/installer/cd-dvd/installation-cd-base.nix @@ -21,6 +21,9 @@ with lib; # ISO naming. isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso"; + # BIOS booting + isoImage.makeBiosBootable = true; + # EFI booting isoImage.makeEfiBootable = true; diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 86c2cd1a8c73..0245a522f7e1 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -535,6 +535,13 @@ in ''; }; + isoImage.makeBiosBootable = mkOption { + default = false; + description = lib.mdDoc '' + Whether the ISO image should be a BIOS-bootable disk. + ''; + }; + isoImage.makeEfiBootable = mkOption { default = false; description = lib.mdDoc '' @@ -693,7 +700,7 @@ in boot.loader.grub.enable = false; environment.systemPackages = [ grubPkgs.grub2 grubPkgs.grub2_efi ] - ++ optional canx86BiosBoot pkgs.syslinux + ++ optional (config.isoImage.makeBiosBootable && canx86BiosBoot) pkgs.syslinux ; # In stage 1 of the boot, mount the CD as the root FS by label so @@ -744,7 +751,7 @@ in { source = pkgs.writeText "version" config.system.nixos.label; target = "/version.txt"; } - ] ++ optionals canx86BiosBoot [ + ] ++ optionals (config.isoImage.makeBiosBootable && canx86BiosBoot) [ { source = config.isoImage.splashImage; target = "/isolinux/background.png"; } @@ -771,7 +778,7 @@ in { source = config.isoImage.efiSplashImage; target = "/EFI/boot/efi-background.png"; } - ] ++ optionals (config.boot.loader.grub.memtest86.enable && canx86BiosBoot) [ + ] ++ optionals (config.boot.loader.grub.memtest86.enable && config.isoImage.makeBiosBootable && canx86BiosBoot) [ { source = "${pkgs.memtest86plus}/memtest.bin"; target = "/boot/memtest.bin"; } @@ -786,10 +793,10 @@ in # Create the ISO image. system.build.isoImage = pkgs.callPackage ../../../lib/make-iso9660-image.nix ({ inherit (config.isoImage) isoName compressImage volumeID contents; - bootable = canx86BiosBoot; + bootable = config.isoImage.makeBiosBootable && canx86BiosBoot; bootImage = "/isolinux/isolinux.bin"; - syslinux = if canx86BiosBoot then pkgs.syslinux else null; - } // optionalAttrs (config.isoImage.makeUsbBootable && canx86BiosBoot) { + syslinux = if config.isoImage.makeBiosBootable && canx86BiosBoot then pkgs.syslinux else null; + } // optionalAttrs (config.isoImage.makeUsbBootable && config.isoImage.makeBiosBootable && canx86BiosBoot) { usbBootable = true; isohybridMbrImage = "${pkgs.syslinux}/share/syslinux/isohdpfx.bin"; } // optionalAttrs config.isoImage.makeEfiBootable { From 905be9f8c5d0bcc95dbd26f9d5a53f61c48d9798 Mon Sep 17 00:00:00 2001 From: Ivan Trubach Date: Thu, 9 Mar 2023 19:05:51 +0300 Subject: [PATCH 2/3] nixos/iso-image: s/efi/EFI in documentation --- nixos/modules/installer/cd-dvd/iso-image.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 0245a522f7e1..8fa070b03db3 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -545,7 +545,7 @@ in isoImage.makeEfiBootable = mkOption { default = false; description = lib.mdDoc '' - Whether the ISO image should be an efi-bootable volume. + Whether the ISO image should be an EFI-bootable volume. ''; }; From 39620acea8d86488e8ecb37424643ff94c5ea0a3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 15 Mar 2023 19:52:15 +0000 Subject: [PATCH 3/3] vim: 9.0.1369 -> 9.0.1403 --- pkgs/applications/editors/vim/common.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/vim/common.nix b/pkgs/applications/editors/vim/common.nix index 1a39a8ac8b0e..f963dfec66d0 100644 --- a/pkgs/applications/editors/vim/common.nix +++ b/pkgs/applications/editors/vim/common.nix @@ -1,12 +1,12 @@ { lib, fetchFromGitHub }: rec { - version = "9.0.1369"; + version = "9.0.1403"; src = fetchFromGitHub { owner = "vim"; repo = "vim"; rev = "v${version}"; - hash = "sha256-2YjWd07RMyiITnuI3/L0D9MiAxl2+9QVT1nrMBA9/dI="; + hash = "sha256-z+zLRO0yqWu/l3eOzD7pmUvmqhmkH5W9z7wE9QWlsG0="; }; enableParallelBuilding = true;