From 5ce098764015d2190650fa51ca33f525159cde52 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Thu, 17 Apr 2025 16:07:16 +0200 Subject: [PATCH] retain nix_path for debugging --- launch/main.tf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/launch/main.tf b/launch/main.tf index 5095a430..abedff6c 100644 --- a/launch/main.tf +++ b/launch/main.tf @@ -50,6 +50,7 @@ variable "initialUser" { locals { system = "x86_64-linux" pins = jsondecode(file("${path.module}/.npins.json")) + nix_path = "${join(":", [for name, path in local.pins : "${name}=${path}"])}:flake=${local.pins["nixpkgs"]}:flake" peripheral_configs = { garage = "test01" } @@ -105,7 +106,8 @@ resource "terraform_data" "nixos" { provisioner "local-exec" { working_dir = path.root environment = { - NIX_PATH = join(":", [for name, path in local.pins : "${name}=${path}"]), + # nix path used on deploy + NIX_PATH = local.nix_path } # TODO: refactor back to command="ignoreme" interpreter=concat([]) to protect sensitive data from error logs? # TODO: build on target? @@ -132,6 +134,8 @@ resource "terraform_data" "nixos" { # FIXME: get VM details from TF ${path.root}/../infra/test-machines/${each.value.hostname} ]; + # nix path for debugging + nix.nixPath = [ "${local.nix_path}" ]; }; }; in {