nixos/bootspec: remove enable option

Bootspec has been enabled by default and marked internal for a long
time.

Dropping this option avoids us needing fallbacks in bootloader scripts.
This commit is contained in:
r-vdp 2026-06-09 21:45:47 +03:00
commit c44bf2a69d
No known key found for this signature in database
4 changed files with 7 additions and 33 deletions

View file

@ -97,13 +97,13 @@ let
};
in
{
imports = [
(lib.mkRemovedOptionModule [ "boot" "bootspec" "enable" ] ''
Bootspec is now always generated and can no longer be disabled.
'')
];
options.boot.bootspec = {
enable =
lib.mkEnableOption "the generation of RFC-0125 bootspec in $system/boot.json, e.g. /run/current-system/boot.json"
// {
default = true;
internal = true;
};
enableValidation = lib.mkEnableOption ''
the validation of bootspec documents for each build.
This will introduce Go in the build-time closure as we are relying on [Cuelang](https://cuelang.org/) for schema validation.

View file

@ -44,7 +44,7 @@ let
printf "%s " "''${extraDependencies[@]}" > "$out/extra-dependencies"
${optionalString (!config.boot.isContainer && config.boot.bootspec.enable) ''
${optionalString (!config.boot.isContainer) ''
${config.boot.bootspec.writer}
${optionalString config.boot.bootspec.enableValidation ''${config.boot.bootspec.validator} "$out/${config.boot.bootspec.filename}"''}
''}

View file

@ -24,8 +24,6 @@ let
environment.systemPackages = [ pkgs.efibootmgr ];
};
standard = {
boot.bootspec.enable = true;
imports = [
baseline
systemd-boot
@ -53,8 +51,6 @@ in
meta.maintainers = with pkgs.lib.maintainers; [ raitobezarius ];
nodes.machine = {
boot.bootspec.enable = true;
imports = [
baseline
grub
@ -75,8 +71,6 @@ in
meta.maintainers = with pkgs.lib.maintainers; [ raitobezarius ];
nodes.machine = {
boot.bootspec.enable = true;
imports = [
baseline
grub

View file

@ -772,26 +772,6 @@ in
}
);
no-bootspec = runTest (
{ lib, ... }:
{
name = "systemd-boot-no-bootspec";
meta.maintainers = with lib.maintainers; [ julienmalka ];
nodes.machine = {
imports = [ common ];
boot.bootspec.enable = false;
};
testScript =
# python
''
machine.start()
machine.wait_for_unit("multi-user.target")
'';
}
);
bootCounting =
let
baseConfig = {