forked from fediversity/fediversity
retain nix_path for debugging
This commit is contained in:
parent
69b6cac387
commit
5ce0987640
1 changed files with 5 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue