migrate infra to terranix

This commit is contained in:
Romain Paquet 2026-01-19 18:47:16 +01:00
parent 32c4eeb2f8
commit de32fe0db0
16 changed files with 295 additions and 289 deletions

View file

@ -1,7 +1,28 @@
{ self, ... }:
{
perSystem =
{ pkgs, ... }:
{
terranix.terranixConfigurations.infra = {
terraformWrapper.package = pkgs.opentofu.withPlugins (p: [
p.hashicorp_external
p.hetznercloud_hcloud
]);
extraArgs = { inherit (self) infra; };
modules = [
./base.nix
./dns.nix
./mail.nix
./radicle.nix
./web.nix
];
};
};
flake.infra =
let
tf_outputs = builtins.fromJSON (builtins.readFile ../infra/outputs.json);
tf_outputs = builtins.fromJSON (builtins.readFile ./outputs.json);
in
{
machines = {
@ -12,6 +33,7 @@
};
crocus = {
ipv4 = tf_outputs.crocus_ipv4.value;
ipv6 = "2a01:4f8:1c1e:e415::1";
};
};
};