feat(dns): IPv4 for rescue01 #80
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 ]; };
|
||||
|
||||
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)
|
||||
mdebray marked this conversation as resolved
Outdated
thubrecht
commented
Je pense que cette version est plus lisible
Je pense que cette version est plus lisible
```
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)
];
```
|
||||
(mkHost "v4.${base}" v4)
|
||||
(mkHost "v6.${base}" v6)
|
||||
];
|
||||
|
||||
cnames = builtins.mapAttrs (_: to: { CNAME = [ to ]; }) {
|
||||
"dev" = "dev.pages.codeberg.page.";
|
||||
|
@ -27,7 +42,7 @@ let
|
|||
hosted = fuseAttrs (
|
||||
builtins.attrValues (
|
||||
builtins.mapAttrs mkHosted {
|
||||
compute01 = [
|
||||
compute01.dual = [
|
||||
"arkheon" # Arkheon
|
||||
"cloud" # Nextcloud
|
||||
"code" # Collabora Online
|
||||
|
@ -44,9 +59,7 @@ let
|
|||
"telegraf" # Telegraf
|
||||
];
|
||||
|
||||
rescue01 = [ "status" ];
|
||||
|
||||
storage01 = [
|
||||
storage01.dual = [
|
||||
"cachix" # Attic
|
||||
"git" # Forgejo
|
||||
"influx" # InfluxDB
|
||||
|
@ -61,7 +74,9 @@ let
|
|||
"s3"
|
||||
];
|
||||
|
||||
web01 = [
|
||||
rescue01.dual = [ "status" ];
|
||||
|
||||
web01.dual = [
|
||||
"*.wp" # Wordpress
|
||||
"analytics" # Plausible Analytics
|
||||
"calendrier" # Metis
|
||||
|
@ -166,6 +181,10 @@ in
|
|||
{
|
||||
A = ipv4;
|
||||
AAAA = ipv6;
|
||||
subdomains = {
|
||||
v4.A = ipv4;
|
||||
v6.AAAA = ipv6;
|
||||
};
|
||||
}
|
||||
)
|
||||
) meta.nodes;
|
||||
|
|
|
@ -172,5 +172,6 @@
|
|||
};
|
||||
};
|
||||
hostId = "007f0200";
|
||||
addresses.ipv4 = [ "82.67.34.230" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -74,6 +74,8 @@
|
|||
rescue01 = {
|
||||
site = "luj01";
|
||||
|
||||
deployment.targetHost = "v6.rescue01.luj01.infra.dgnum.eu";
|
||||
|
||||
stateVersion = "23.11";
|
||||
vm-cluster = "Hyperviseur Luj";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue
J'avoue que je vois pas l'intérêt de
getLastDomain
puisque c'est utilisé uniquement dansmkHosted
qui n'est utilisé que surhosted
, si tu gardes justerescue01 = [ "status" ]
à la place de"web.rescue01" = [ "status" ]
ça fait exactement pareilIl me semble que non parce que là j'ai
alors que ce que tu proposes
Mon design permet de dissocier les trucs qui seront du HTTP (donc accessible en v4) des protocoles non http (SSH par ex) qui sont v6 only