Apply makeInstallerIso to conf in provision.sh

This commit is contained in:
Nicolas Jeannerod 2025-02-21 10:48:35 +01:00
parent bf0a35de6c
commit d77b04ec18
Signed by untrusted user: Niols
GPG key ID: 35DB9EC8886E1CB8
2 changed files with 13 additions and 20 deletions

View file

@ -2,7 +2,6 @@
let let
allVmIds = builtins.genList (x: 100 + x) 156; # 100 -- 255 allVmIds = builtins.genList (x: 100 + x) 156; # 100 -- 255
makeInstallerIso = import ../infra/makeInstallerIso.nix;
in in
{ {
@ -26,24 +25,6 @@ in
}) allVmIds }) allVmIds
); );
flake.isoInstallers.provisioning =
let
inherit (builtins) mapAttrs;
in
mapAttrs (
vmname: nixosConfiguration:
makeInstallerIso {
inherit (inputs) nixpkgs;
inherit nixosConfiguration;
hostKeys = {
ed25519 = {
private = ./hostKeys/${vmname}/ssh_host_ed25519_key;
public = ./hostKeys/${vmname}/ssh_host_ed25519_key.pub;
};
};
}
) self.nixosConfigurations.provisioning;
nixops4Deployments.feditest = nixops4Deployments.feditest =
{ providers, ... }: { providers, ... }:

View file

@ -177,7 +177,19 @@ build_iso () {
printf 'Building ISO for VM %d...\n' "$1" printf 'Building ISO for VM %d...\n' "$1"
nix build \ nix build \
".#isoInstallers.provisioning.fedi$1" \ --impure --expr "
let flake = builtins.getFlake (builtins.toString ./.); in
flake.lib.makeInstallerIso {
nixosConfiguration = flake.nixosConfigurations.provisioning.fedi$1;
nixpkgs = flake.inputs.nixpkgs;
hostKeys = {
ed25519 = {
private = ./deployment/hostKeys/fedi$1/ssh_host_ed25519_key;
public = ./deployment/hostKeys/fedi$1/ssh_host_ed25519_key.pub;
};
};
}
" \
--log-format raw --quiet \ --log-format raw --quiet \
--out-link "$tmpdir/installer-fedi$1" --out-link "$tmpdir/installer-fedi$1"