From 38e50898148a137bfbd97ed9acf52b87af37f19e Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Fri, 2 Dec 2022 11:43:07 -0800 Subject: nixos/activation/bootspec: drop problematic comment, only generate bootspec when bootspec is enabled --- nixos/modules/system/activation/bootspec.nix | 2 +- nixos/modules/system/activation/top-level.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'nixos/modules/system') diff --git a/nixos/modules/system/activation/bootspec.nix b/nixos/modules/system/activation/bootspec.nix index cf74244b43b4a..59b9f47339653 100644 --- a/nixos/modules/system/activation/bootspec.nix +++ b/nixos/modules/system/activation/bootspec.nix @@ -50,7 +50,7 @@ let --arg init "$out/init" \ < ${json} \ | ${pkgs.jq}/bin/jq \ - --sort-keys \ # Slurp all specialisations and inject them as values in .specialisations.{name} = {specialisation bootspec}. + --sort-keys \ '.v1.specialisation = ($ARGS.named | map_values(. | first | .v1))' \ ${lib.concatStringsSep " " specialisationLoader} \ > $out/bootspec/${filename} diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 7d44d37a0fcf9..a12a565af1f75 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -79,7 +79,7 @@ let echo -n "${toString config.system.extraDependencies}" > $out/extra-dependencies - ${optionalString (!config.boot.isContainer) '' + ${optionalString (!config.boot.isContainer && config.boot.bootspec.enable) '' ${config.boot.bootspec.writer} ${config.boot.bootspec.validator} "$out/bootspec/${config.boot.bootspec.filename}" ''} -- cgit 1.4.1