infra: add flake module and crocus exports
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
./clanServices/flake-module.nix
|
./clanServices/flake-module.nix
|
||||||
./devShells/flake-module.nix
|
./devShells/flake-module.nix
|
||||||
./home-manager/flake-module.nix
|
./home-manager/flake-module.nix
|
||||||
|
./infra/flake-module.nix
|
||||||
./modules/flake-module.nix
|
./modules/flake-module.nix
|
||||||
./packages/flake-module.nix
|
./packages/flake-module.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -62,3 +62,7 @@ resource "hcloud_firewall" "crocus_firewall" {
|
|||||||
source_ips = ["0.0.0.0/0", "::/0"]
|
source_ips = ["0.0.0.0/0", "::/0"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output "crocus_ipv4" {
|
||||||
|
value = hcloud_primary_ip.crocus_ipv4.ip_address
|
||||||
|
}
|
||||||
|
|||||||
18
infra/flake-module.nix
Normal file
18
infra/flake-module.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
flake.infra =
|
||||||
|
let
|
||||||
|
tf_outputs = builtins.fromJSON (builtins.readFile ../infra/outputs.json);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
machines = {
|
||||||
|
verbena = {
|
||||||
|
ipv4 = tf_outputs.verbena_ipv4.value;
|
||||||
|
ipv6 = tf_outputs.verbena_ipv6.value;
|
||||||
|
gateway6 = tf_outputs.verbena_gateway6.value;
|
||||||
|
};
|
||||||
|
crocus = {
|
||||||
|
ipv4 = tf_outputs.crocus_ipv4.value;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
{
|
{
|
||||||
|
"crocus_ipv4": {
|
||||||
|
"sensitive": false,
|
||||||
|
"type": "string",
|
||||||
|
"value": "116.203.18.122"
|
||||||
|
},
|
||||||
"verbena_gateway6": {
|
"verbena_gateway6": {
|
||||||
"sensitive": false,
|
"sensitive": false,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
Reference in New Issue
Block a user