Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FMO-60: Add compressed target for installer image #78

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading