installer/iso-image: use system.build.image
and rename: - isoImage.isoBaseName -> image.baseName - isoImage.isoName -> image.fileName
This commit is contained in:
@@ -15,9 +15,6 @@
|
||||
# Adds terminus_font for people with HiDPI displays
|
||||
console.packages = options.console.packages.default ++ [ pkgs.terminus_font ];
|
||||
|
||||
# ISO naming.
|
||||
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";
|
||||
|
||||
# EFI booting
|
||||
isoImage.makeEfiBootable = true;
|
||||
|
||||
|
||||
@@ -476,24 +476,34 @@ let
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
(lib.mkRenamedOptionModuleWith {
|
||||
sinceRelease = 2505;
|
||||
from = [
|
||||
"isoImage"
|
||||
"isoBaseName"
|
||||
];
|
||||
to = [
|
||||
"image"
|
||||
"baseName"
|
||||
];
|
||||
})
|
||||
(lib.mkRenamedOptionModuleWith {
|
||||
sinceRelease = 2505;
|
||||
from = [
|
||||
"isoImage"
|
||||
"isoName"
|
||||
];
|
||||
to = [
|
||||
"image"
|
||||
"fileName"
|
||||
];
|
||||
})
|
||||
../../image/file-options.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
|
||||
isoImage.isoName = lib.mkOption {
|
||||
default = "${config.isoImage.isoBaseName}.iso";
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Name of the generated ISO image file.
|
||||
'';
|
||||
};
|
||||
|
||||
isoImage.isoBaseName = lib.mkOption {
|
||||
default = config.system.nixos.distroId;
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Prefix of the name of the generated ISO image file.
|
||||
'';
|
||||
};
|
||||
|
||||
isoImage.compressImage = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
@@ -858,8 +868,12 @@ in
|
||||
boot.loader.timeout = 10;
|
||||
|
||||
# Create the ISO image.
|
||||
image.extension = if config.isoImage.compressImage then "iso.zst" else "iso";
|
||||
image.filePath = "iso/${config.image.fileName}";
|
||||
system.build.image = config.system.build.isoImage;
|
||||
system.build.isoImage = pkgs.callPackage ../../../lib/make-iso9660-image.nix ({
|
||||
inherit (config.isoImage) isoName compressImage volumeID contents;
|
||||
inherit (config.isoImage) compressImage volumeID contents;
|
||||
isoName = "${config.image.baseName}.iso";
|
||||
bootable = config.isoImage.makeBiosBootable;
|
||||
bootImage = "/isolinux/isolinux.bin";
|
||||
syslinux = if config.isoImage.makeBiosBootable then pkgs.syslinux else null;
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ let
|
||||
hydraJob ((import lib/eval-config.nix {
|
||||
inherit system;
|
||||
modules = makeModules module {
|
||||
isoImage.isoBaseName = "nixos-${type}";
|
||||
image.baseName = "nixos-${type}";
|
||||
};
|
||||
}).config.system.build.isoImage);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ let
|
||||
|
||||
config = (import ../../../../nixos/lib/eval-config.nix {
|
||||
inherit system;
|
||||
modules = [ module { isoImage.isoBaseName = isoBaseName; } ] ++ extraModules;
|
||||
modules = [ module { image.baseName = isoBaseName; } ] ++ extraModules;
|
||||
}).config;
|
||||
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user