Create minimal and graphical ISOs

This commit is contained in:
Vili Sinervä 2025-07-24 13:53:49 +03:00
parent f5f7ad9834
commit 22c1f4adc8
Signed by: Vili Sinervä
SSH key fingerprint: SHA256:FladqYjaE4scJY3Hi+gnShZ6ygnTJgixy0I6BAoHyos
5 changed files with 42 additions and 33 deletions

View file

@ -71,6 +71,9 @@
_: host: host.config.system.build.toplevel
) self.nixosConfigurations;
hydraJobs.isos.installer = self.nixosConfigurations.installer.config.system.build.isoImage;
hydraJobs.isos = {
installer-minimal = self.nixosConfigurations.installer-minimal.config.system.build.isoImage;
installer-graphical = self.nixosConfigurations.installer-graphical.config.system.build.isoImage;
};
};
}

View file

@ -0,0 +1,9 @@
{ nixpkgs-flake, ... }:
{
imports = [
"${nixpkgs-flake}/nixos/modules/installer/cd-dvd/installation-cd-graphical-combined.nix"
];
custom.platform.installer.enable = true;
isoImage.squashfsCompression = "zstd";
system.installer.channel.enable = false;
}

View file

@ -0,0 +1,9 @@
{ nixpkgs-flake, ... }:
{
imports = [
"${nixpkgs-flake}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
];
custom.platform.installer.enable = true;
isoImage.squashfsCompression = "zstd";
system.installer.channel.enable = false;
}

View file

@ -1,32 +0,0 @@
{
config,
nixpkgs-flake,
lib,
pkgs,
...
}:
let
zfs = pkgs.zfsUnstable.override {
# this overrides saves 10MB
samba = pkgs.coreutils;
python3 = pkgs.python3Minimal;
};
in
{
imports = [
"${nixpkgs-flake}/nixos/modules/installer/cd-dvd/installation-cd-graphical-combined.nix"
];
# This block modified from https://github.com/nix-community/nixos-images
boot.zfs.package = zfs;
environment.defaultPackages = lib.mkForce [ zfs ];
boot.kernelModules = [ "zfs" ];
boot.extraModulePackages = [ config.boot.kernelPackages.zfs_unstable ];
custom.services.nixCacheClient.enable = true;
services.qemuGuest.enable = true;
system.installer.channel.enable = false;
isoImage.squashfsCompression = "zstd";
networking.wireless.enable = false;
}

View file

@ -0,0 +1,20 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.custom.platform.installer;
in
{
options.custom.platform.installer.enable = lib.mkEnableOption "installer ISO configuration";
config = lib.mkIf cfg.enable {
boot.supportedFilesystems.zfs = lib.mkForce true;
users.defaultUserShell = lib.mkForce pkgs.bash;
custom.services.nixCacheClient.enable = true;
services.qemuGuest.enable = true;
networking.wireless.enable = false;
};
}