From 372711db8c290ebc5b09d1cb89730d17b6a9dafe Mon Sep 17 00:00:00 2001 From: buianhhuy96 <73339292+buianhhuy96@users.noreply.github.com> Date: Mon, 28 Oct 2024 10:42:08 +0200 Subject: [PATCH] FMO-60: Add compressed target for installer image (#78) - Add fmo-os-installer-debug-compressed and fmo-os-installer-release-compressed Signed-off-by: Anh Huy Bui --- config-processor-installers.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/config-processor-installers.nix b/config-processor-installers.nix index 11f6812..04f79ad 100644 --- a/config-processor-installers.nix +++ b/config-processor-installers.nix @@ -26,7 +26,7 @@ let in installers; - installer = variant: let + installer = variant: compressed: let system = "x86_64-linux"; installerImgCfg = lib.nixosSystem { @@ -87,20 +87,24 @@ let installer.${installerconf.installer.name} = installerApp installerconf.installer; } { - isoImage.squashfsCompression = "lz4"; + isoImage.squashfsCompression = if compressed=="compressed" then "zstd" else "lz4"; } ] ++ (addSystemPackages installerconf.systemPackages) ++ (if lib.hasAttr "extraModules" installerconf then installerconf.extraModules else []); }; in { - name = "${installerconf.name}-${variant}"; + name = if compressed == "compressed" + then "${installerconf.name}-${variant}-compressed" + else "${installerconf.name}-${variant}"; inherit installerImgCfg system; installerImgDrv = installerImgCfg.config.system.build.${installerImgCfg.config.formatAttr}; }; targets = [ - (installer "debug") - (installer "release") + (installer "debug" "") + (installer "release" "") + (installer "debug" "compressed") + (installer "release" "compressed") ]; in { flake = {