diff --git a/nixos-modules/image/boot/fit-image/default.nix b/nixos-modules/image/boot/fit-image/default.nix index 0206c7c8..3be8ee62 100644 --- a/nixos-modules/image/boot/fit-image/default.nix +++ b/nixos-modules/image/boot/fit-image/default.nix @@ -59,7 +59,7 @@ in }; }; - config = lib.mkIf (cfg.bootVariant == "fit-image") { + config = lib.mkIf (cfg.enable && cfg.bootVariant == "fit-image") { custom.image.bootFileCommands = '' ( # source the setup file to get access to `substituteInPlace` diff --git a/nixos-modules/image/boot/uefi/default.nix b/nixos-modules/image/boot/uefi/default.nix index d68c7afc..76321daf 100644 --- a/nixos-modules/image/boot/uefi/default.nix +++ b/nixos-modules/image/boot/uefi/default.nix @@ -16,7 +16,7 @@ let systemdBoot = "${config.systemd.package}/lib/systemd/boot/efi/systemd-boot${pkgs.stdenv.hostPlatform.efiArch}.efi"; in { - config = lib.mkIf (cfg.bootVariant == "uefi") { + config = lib.mkIf (cfg.enable && cfg.bootVariant == "uefi") { assertions = [{ assertion = config.hardware.deviceTree.enable -> config.hardware.deviceTree.name != null; message = "need to specify config.hardware.deviceTree.name";