From dc3a4dc4e80f0ed01d5f2bafeb0fb405a859b7e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=E2=80=9CNiols=E2=80=9D=20Jeannerod?= Date: Wed, 19 Feb 2025 17:24:51 +0100 Subject: [PATCH] Merge `machine` argument into the attrset argument --- deployment/flake-part.nix | 3 ++- deployment/makeInstaller.nix | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/deployment/flake-part.nix b/deployment/flake-part.nix index d6628a27..6baf7624 100644 --- a/deployment/flake-part.nix +++ b/deployment/flake-part.nix @@ -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; diff --git a/deployment/makeInstaller.nix b/deployment/makeInstaller.nix index a5f787ef..a6155ce3 100644 --- a/deployment/makeInstaller.nix +++ b/deployment/makeInstaller.nix @@ -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: ''