forked from fediversity/fediversity
retain nix_path for debugging
This commit is contained in:
parent
c156850fd4
commit
832fa92fc5
1 changed files with 5 additions and 1 deletions
|
|
@ -50,6 +50,7 @@ variable "initialUser" {
|
||||||
locals {
|
locals {
|
||||||
system = "x86_64-linux"
|
system = "x86_64-linux"
|
||||||
pins = jsondecode(file("${path.module}/.npins.json"))
|
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 = {
|
peripheral_configs = {
|
||||||
garage = "test01"
|
garage = "test01"
|
||||||
}
|
}
|
||||||
|
|
@ -105,7 +106,8 @@ resource "terraform_data" "nixos" {
|
||||||
provisioner "local-exec" {
|
provisioner "local-exec" {
|
||||||
working_dir = path.root
|
working_dir = path.root
|
||||||
environment = {
|
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: refactor back to command="ignoreme" interpreter=concat([]) to protect sensitive data from error logs?
|
||||||
# TODO: build on target?
|
# TODO: build on target?
|
||||||
|
|
@ -132,6 +134,8 @@ resource "terraform_data" "nixos" {
|
||||||
# FIXME: get VM details from TF
|
# FIXME: get VM details from TF
|
||||||
${path.root}/../infra/test-machines/${each.value.hostname}
|
${path.root}/../infra/test-machines/${each.value.hostname}
|
||||||
];
|
];
|
||||||
|
# nix path for debugging
|
||||||
|
nix.nixPath = [ "${local.nix_path}" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue