forked from fediversity/fediversity
move info passed to facilitate passing extra config
This commit is contained in:
parent
3716de6409
commit
e6b06c86a6
1 changed files with 9 additions and 7 deletions
|
|
@ -89,12 +89,6 @@ resource "terraform_data" "nixos" {
|
||||||
os = import <nixpkgs/nixos> {
|
os = import <nixpkgs/nixos> {
|
||||||
system = "${local.system}";
|
system = "${local.system}";
|
||||||
configuration = {
|
configuration = {
|
||||||
# needed info passed in thru json from TF
|
|
||||||
terraform = builtins.fromJSON "${replace(jsonencode({
|
|
||||||
domain = var.domain
|
|
||||||
hostname = each.value.hostname
|
|
||||||
initialUser = var.initialUser
|
|
||||||
}), "\"", "\\\"")}";
|
|
||||||
# note interpolations here TF ones
|
# note interpolations here TF ones
|
||||||
imports = [
|
imports = [
|
||||||
${path.root}/options.nix
|
${path.root}/options.nix
|
||||||
|
|
@ -105,7 +99,15 @@ resource "terraform_data" "nixos" {
|
||||||
];
|
];
|
||||||
# nix path for debugging
|
# nix path for debugging
|
||||||
nix.nixPath = [ "${local.nix_path}" ];
|
nix.nixPath = [ "${local.nix_path}" ];
|
||||||
};
|
} //
|
||||||
|
# info passed in thru json from TF
|
||||||
|
builtins.fromJSON "${replace(jsonencode({
|
||||||
|
terraform = {
|
||||||
|
domain = var.domain
|
||||||
|
hostname = each.value.hostname
|
||||||
|
initialUser = var.initialUser
|
||||||
|
}
|
||||||
|
}), "\"", "\\\"")}";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
# info we want to get back out
|
# info we want to get back out
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue