From 49781e012127cadc309b3d252dc0bbdbe1e439fb Mon Sep 17 00:00:00 2001 From: rogueking Date: Sat, 20 Jun 2026 18:12:28 -0400 Subject: [PATCH] build iso's of all hosts --- .gitea/workflows/iso-builder.yml | 4 ++++ hosts/iso/default.nix | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/iso-builder.yml b/.gitea/workflows/iso-builder.yml index 8d9656e..9cd87ce 100644 --- a/.gitea/workflows/iso-builder.yml +++ b/.gitea/workflows/iso-builder.yml @@ -2,6 +2,8 @@ name: Build NixOS ISOs on: push: + branches: + - main paths: - hosts/acheron/** - hosts/armaros/** @@ -13,6 +15,8 @@ on: - flake.nix - flake.lock - .gitea/workflows/iso-builder.yml + tags: + - v* workflow_dispatch: inputs: publish-release: diff --git a/hosts/iso/default.nix b/hosts/iso/default.nix index 2fed526..d1bcd64 100644 --- a/hosts/iso/default.nix +++ b/hosts/iso/default.nix @@ -43,9 +43,21 @@ in { # Without this, disko would try to apply filesystems/boot config at build time, # which conflicts with ISO-specific overrides and can cause boot failures. disko.enableConfig = false; + + # Slim disko CLI. The upstream `disko` package wraps the script with + # nixos-install-tools + xcp on PATH, which drags in xfsprogs/zfs-user/ + # cifs-utils/etc. and blows the minimal-CD ISO past its size budget. + # The `disko` command itself only needs nix-build + coreutils; the + # generated scripts use util-linux tools (mount, sgdisk, parted, mkfs.*) + # that are already on the ISO or added to environment.systemPackages below. + # nixos-install-tools is only needed by `disko-install`, not `disko`. + diskoPkg = inputs.disko.packages.${pkgs.system}.disko.overrideAttrs (old: { + # Rebuild the wrapper without nixos-install-tools / xcp. + installPhase = builtins.replaceStrings ["xcp"] [""] old.installPhase; + }); # Standard installer tools. The disko *module* (inputs.disko.nixosModules.disko) # only wires up system.build.diskoScript + fileSystems config — it does NOT put - # the `disko` CLI on PATH. We need the separate disko package for rescue use. + # the `disko` CLI on PATH. We add the slim disko package for rescue use. environment.systemPackages = with pkgs; [ git @@ -55,7 +67,7 @@ in { parted gptfdisk efibootmgr - inputs.disko.packages.${pkgs.system}.disko + config.diskoPkg ] ++ cfg.extraPackages;