nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

nixos/system/activation/bootspec: generalize the bootspec tooling package

After RFC-0125 implementation, Determinate Systems was pinged multiple
times to transfer the repository ownership of the tooling to a
vendor-neutral repository.

Unfortunately, this never manifested. Additionally, the leadership of
the NixOS project was too dysfunctional to deal with this sort of
problem. It might even still be the case up to this day.

Nonetheless, nixpkgs is about enabling end users to enact their own
policies. It would be better to live in a world where there is one
obvious choice of bootspec tooling, in the meantime, we can live in a
world where people can choose their bootspec tooling.

The Lix forge possess one fork of the Bootspec tooling:
https://git.lix.systems/lix-community/bootspec which will live its own
life from now on.

Change-Id: I00c4dd64e00b4c24f6641472902e7df60ed13b55
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>

+86 -82
+2
nixos/modules/system/activation/bootspec.nix
··· 111 111 Enable this option if you want to ascertain that your documents are correct 112 112 ''; 113 113 114 + package = lib.mkPackageOption pkgs "bootspec" { }; 115 + 114 116 extensions = lib.mkOption { 115 117 # NOTE(RaitoBezarius): this is not enough to validate: extensions."osRelease" = drv; those are picked up by cue validation. 116 118 type = lib.types.attrsOf lib.types.anything; # <namespace>: { ...namespace-specific fields }
+1 -1
nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix
··· 47 47 48 48 systemd = config.systemd.package; 49 49 50 - bootspecTools = pkgs.bootspec; 50 + bootspecTools = config.boot.bootspec.package; 51 51 52 52 nix = config.nix.package.out; 53 53
+83 -81
nixos/tests/installer.nix
··· 680 680 in 681 681 { 682 682 # The configuration of the system used to run "nixos-install". 683 - installer = { 684 - imports = [ 685 - commonConfig 686 - ../modules/profiles/installation-device.nix 687 - ../modules/profiles/base.nix 688 - extraInstallerConfig 689 - ./common/auto-format-root-device.nix 690 - ]; 683 + installer = 684 + { config, ... }: 685 + { 686 + imports = [ 687 + commonConfig 688 + ../modules/profiles/installation-device.nix 689 + ../modules/profiles/base.nix 690 + extraInstallerConfig 691 + ./common/auto-format-root-device.nix 692 + ]; 691 693 692 - # In systemdStage1, also automatically format the device backing the 693 - # root filesystem. 694 - virtualisation.fileSystems."/".autoFormat = systemdStage1; 694 + # In systemdStage1, also automatically format the device backing the 695 + # root filesystem. 696 + virtualisation.fileSystems."/".autoFormat = systemdStage1; 695 697 696 - boot.initrd.systemd.enable = systemdStage1; 698 + boot.initrd.systemd.enable = systemdStage1; 697 699 698 - # Use a small /dev/vdb as the root disk for the 699 - # installer. This ensures the target disk (/dev/vda) is 700 - # the same during and after installation. 701 - virtualisation.emptyDiskImages = [ 512 ]; 702 - virtualisation.rootDevice = "/dev/vdb"; 700 + # Use a small /dev/vdb as the root disk for the 701 + # installer. This ensures the target disk (/dev/vda) is 702 + # the same during and after installation. 703 + virtualisation.emptyDiskImages = [ 512 ]; 704 + virtualisation.rootDevice = "/dev/vdb"; 703 705 704 - hardware.enableAllFirmware = mkForce false; 705 - nix.package = selectNixPackage pkgs; 706 + nix.package = selectNixPackage pkgs; 707 + hardware.enableAllFirmware = mkForce false; 706 708 707 - # The test cannot access the network, so any packages we 708 - # need must be included in the VM. 709 - system.extraDependencies = 710 - with pkgs; 711 - [ 712 - bintools 713 - brotli 714 - brotli.dev 715 - brotli.lib 716 - desktop-file-utils 717 - docbook5 718 - docbook_xsl_ns 719 - kbd.dev 720 - kmod.dev 721 - libarchive.dev 722 - libxml2.bin 723 - libxslt.bin 724 - nixos-artwork.wallpapers.simple-dark-gray-bottom 725 - ntp 726 - perlPackages.ConfigIniFiles 727 - perlPackages.FileSlurp 728 - perlPackages.JSON 729 - perlPackages.ListCompare 730 - perlPackages.XMLLibXML 731 - # make-options-doc/default.nix 732 - (python3.withPackages (p: [ p.mistune ])) 733 - shared-mime-info 734 - sudo 735 - switch-to-configuration-ng 736 - texinfo 737 - unionfs-fuse 738 - xorg.lndir 739 - shellcheck-minimal 740 - 741 - # add curl so that rather than seeing the test attempt to download 742 - # curl's tarball, we see what it's trying to download 743 - curl 744 - ] 745 - ++ optionals (bootLoader == "grub") ( 746 - let 747 - zfsSupport = extraInstallerConfig.boot.supportedFilesystems.zfs or false; 748 - in 709 + # The test cannot access the network, so any packages we 710 + # need must be included in the VM. 711 + system.extraDependencies = 712 + with pkgs; 749 713 [ 750 - (pkgs.grub2.override { inherit zfsSupport; }) 751 - (pkgs.grub2_efi.override { inherit zfsSupport; }) 752 - pkgs.nixos-artwork.wallpapers.simple-dark-gray-bootloader 753 - pkgs.perlPackages.FileCopyRecursive 754 - pkgs.perlPackages.XMLSAX 755 - pkgs.perlPackages.XMLSAXBase 756 - ] 757 - ) 758 - ++ optionals (bootLoader == "systemd-boot") [ 759 - pkgs.zstd.bin 760 - pkgs.mypy 761 - pkgs.bootspec 762 - ] 763 - ++ optionals clevisTest [ pkgs.klibc ] 764 - ++ optional systemdStage1 pkgs.chroot-realpath; 714 + bintools 715 + brotli 716 + brotli.dev 717 + brotli.lib 718 + desktop-file-utils 719 + docbook5 720 + docbook_xsl_ns 721 + kbd.dev 722 + kmod.dev 723 + libarchive.dev 724 + libxml2.bin 725 + libxslt.bin 726 + nixos-artwork.wallpapers.simple-dark-gray-bottom 727 + ntp 728 + perlPackages.ConfigIniFiles 729 + perlPackages.FileSlurp 730 + perlPackages.JSON 731 + perlPackages.ListCompare 732 + perlPackages.XMLLibXML 733 + # make-options-doc/default.nix 734 + (python3.withPackages (p: [ p.mistune ])) 735 + shared-mime-info 736 + sudo 737 + switch-to-configuration-ng 738 + texinfo 739 + unionfs-fuse 740 + xorg.lndir 741 + shellcheck-minimal 765 742 766 - nix.settings = { 767 - substituters = mkForce [ ]; 768 - hashed-mirrors = null; 769 - connect-timeout = 1; 743 + # add curl so that rather than seeing the test attempt to download 744 + # curl's tarball, we see what it's trying to download 745 + curl 746 + ] 747 + ++ optionals (bootLoader == "grub") ( 748 + let 749 + zfsSupport = extraInstallerConfig.boot.supportedFilesystems.zfs or false; 750 + in 751 + [ 752 + (pkgs.grub2.override { inherit zfsSupport; }) 753 + (pkgs.grub2_efi.override { inherit zfsSupport; }) 754 + pkgs.nixos-artwork.wallpapers.simple-dark-gray-bootloader 755 + pkgs.perlPackages.FileCopyRecursive 756 + pkgs.perlPackages.XMLSAX 757 + pkgs.perlPackages.XMLSAXBase 758 + ] 759 + ) 760 + ++ optionals (bootLoader == "systemd-boot") [ 761 + pkgs.zstd.bin 762 + pkgs.mypy 763 + config.boot.bootspec.package 764 + ] 765 + ++ optionals clevisTest [ pkgs.klibc ] 766 + ++ optional systemdStage1 pkgs.chroot-realpath; 767 + 768 + nix.settings = { 769 + substituters = mkForce [ ]; 770 + hashed-mirrors = null; 771 + connect-timeout = 1; 772 + }; 770 773 }; 771 - }; 772 774 773 775 target = { 774 776 imports = [ commonConfig ];