Merge machine argument into the attrset argument

This commit is contained in:
Nicolas Jeannerod 2025-02-19 17:24:51 +01:00
parent d7bcb45789
commit dc3a4dc4e8
Signed by untrusted user: Niols
GPG key ID: 35DB9EC8886E1CB8
2 changed files with 5 additions and 4 deletions

View file

@ -31,9 +31,10 @@ in
inherit (builtins) mapAttrs;
in
mapAttrs (
vmname:
vmname: nixosConfiguration:
makeInstaller {
inherit (inputs) nixpkgs;
inherit nixosConfiguration;
hostKeys = {
ed25519 = {
private = ./hostKeys/${vmname}/ssh_host_ed25519_key;

View file

@ -7,8 +7,8 @@
{
nixpkgs,
hostKeys ? { },
nixosConfiguration,
}:
machine:
let
inherit (builtins) concatStringsSep attrValues mapAttrs;
@ -25,8 +25,8 @@ let
name = "bootstrap";
runtimeInputs = with pkgs; [ nixos-install-tools ];
text = ''
${machine.config.system.build.diskoScript}
nixos-install --no-root-password --no-channel-copy --system ${machine.config.system.build.toplevel}
${nixosConfiguration.config.system.build.diskoScript}
nixos-install --no-root-password --no-channel-copy --system ${nixosConfiguration.config.system.build.toplevel}
${concatStringsSep "\n" (
attrValues (
mapAttrs (kind: keys: ''