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; inherit (builtins) mapAttrs;
in in
mapAttrs ( mapAttrs (
vmname: vmname: nixosConfiguration:
makeInstaller { makeInstaller {
inherit (inputs) nixpkgs; inherit (inputs) nixpkgs;
inherit nixosConfiguration;
hostKeys = { hostKeys = {
ed25519 = { ed25519 = {
private = ./hostKeys/${vmname}/ssh_host_ed25519_key; private = ./hostKeys/${vmname}/ssh_host_ed25519_key;

View file

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