Skip to content

Commit

Permalink
FMO-60: Add compressed target for installer image (#78)
Browse files Browse the repository at this point in the history
- Add fmo-os-installer-debug-compressed and fmo-os-installer-release-compressed

Signed-off-by: Anh Huy Bui <[email protected]>
  • Loading branch information
buianhhuy96 authored Oct 28, 2024
1 parent 0888591 commit 372711d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions config-processor-installers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ let
in installers;


installer = variant: let
installer = variant: compressed: let
system = "x86_64-linux";

installerImgCfg = lib.nixosSystem {
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 372711d

Please sign in to comment.