forked from DGNum/infrastructure
feat(dns): IPv4 for rescue01
This commit is contained in:
parent
732ed7081d
commit
47d09f6ffa
3 changed files with 28 additions and 6 deletions
31
meta/dns.nix
31
meta/dns.nix
|
@ -10,7 +10,22 @@ let
|
||||||
|
|
||||||
mkCNAME = host: { CNAME = [ host ]; };
|
mkCNAME = host: { CNAME = [ host ]; };
|
||||||
|
|
||||||
mkHosted = server: mapSingleFuse (_: mkCNAME "${server}.${meta.nodes.${server}.site}.infra");
|
mkHosted =
|
||||||
|
server:
|
||||||
|
{
|
||||||
|
dual ? [ ],
|
||||||
|
v4 ? [ ],
|
||||||
|
v6 ? [ ],
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
base = "${server}.${meta.nodes.${server}.site}.infra";
|
||||||
|
mkHost = host: mapSingleFuse (_: mkCNAME host);
|
||||||
|
in
|
||||||
|
fuseAttrs [
|
||||||
|
(mkHost base dual)
|
||||||
|
(mkHost "v4.${base}" v4)
|
||||||
|
(mkHost "v6.${base}" v6)
|
||||||
|
];
|
||||||
|
|
||||||
cnames = builtins.mapAttrs (_: to: { CNAME = [ to ]; }) {
|
cnames = builtins.mapAttrs (_: to: { CNAME = [ to ]; }) {
|
||||||
"dev" = "dev.pages.codeberg.page.";
|
"dev" = "dev.pages.codeberg.page.";
|
||||||
|
@ -27,7 +42,7 @@ let
|
||||||
hosted = fuseAttrs (
|
hosted = fuseAttrs (
|
||||||
builtins.attrValues (
|
builtins.attrValues (
|
||||||
builtins.mapAttrs mkHosted {
|
builtins.mapAttrs mkHosted {
|
||||||
compute01 = [
|
compute01.dual = [
|
||||||
"arkheon" # Arkheon
|
"arkheon" # Arkheon
|
||||||
"cloud" # Nextcloud
|
"cloud" # Nextcloud
|
||||||
"code" # Collabora Online
|
"code" # Collabora Online
|
||||||
|
@ -44,9 +59,7 @@ let
|
||||||
"telegraf" # Telegraf
|
"telegraf" # Telegraf
|
||||||
];
|
];
|
||||||
|
|
||||||
rescue01 = [ "status" ];
|
storage01.dual = [
|
||||||
|
|
||||||
storage01 = [
|
|
||||||
"cachix" # Attic
|
"cachix" # Attic
|
||||||
"git" # Forgejo
|
"git" # Forgejo
|
||||||
"influx" # InfluxDB
|
"influx" # InfluxDB
|
||||||
|
@ -61,7 +74,9 @@ let
|
||||||
"s3"
|
"s3"
|
||||||
];
|
];
|
||||||
|
|
||||||
web01 = [
|
rescue01.dual = [ "status" ];
|
||||||
|
|
||||||
|
web01.dual = [
|
||||||
"*.wp" # Wordpress
|
"*.wp" # Wordpress
|
||||||
"analytics" # Plausible Analytics
|
"analytics" # Plausible Analytics
|
||||||
"calendrier" # Metis
|
"calendrier" # Metis
|
||||||
|
@ -166,6 +181,10 @@ in
|
||||||
{
|
{
|
||||||
A = ipv4;
|
A = ipv4;
|
||||||
AAAA = ipv6;
|
AAAA = ipv6;
|
||||||
|
subdomains = {
|
||||||
|
v4.A = ipv4;
|
||||||
|
v6.AAAA = ipv6;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
) meta.nodes;
|
) meta.nodes;
|
||||||
|
|
|
@ -172,5 +172,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
hostId = "007f0200";
|
hostId = "007f0200";
|
||||||
|
addresses.ipv4 = [ "82.67.34.230" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,8 @@
|
||||||
rescue01 = {
|
rescue01 = {
|
||||||
site = "luj01";
|
site = "luj01";
|
||||||
|
|
||||||
|
deployment.targetHost = "v6.rescue01.luj01.infra.dgnum.eu";
|
||||||
|
|
||||||
stateVersion = "23.11";
|
stateVersion = "23.11";
|
||||||
vm-cluster = "Hyperviseur Luj";
|
vm-cluster = "Hyperviseur Luj";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue