fix: enable s3 DNS aliases

This commit is contained in:
Greg Hellings
2026-05-19 23:47:42 -05:00
parent 387a34ffff
commit 95eea6fc26
3 changed files with 10 additions and 3 deletions
+7 -2
View File
@@ -115,10 +115,15 @@ in
"@\tIN\tSOA\t${config.networking.hostName}\tgreg@thehellings.com (1 1m 1m 1m 1m)" "@\tIN\tSOA\t${config.networking.hostName}\tgreg@thehellings.com (1 1m 1m 1m 1m)"
"\tIN\tNS\t${config.networking.hostName}" "\tIN\tNS\t${config.networking.hostName}"
]; ];
makeHost = host: "${host.name}\tIN\tA\t${host.address}"; makeHost =
host:
[ "${host.name}\tIN\tA\t${host.address}" ]
++ lib.map (a: "${a}\tIN\tA\t${host.address}") (
if builtins.hasAttr "aliases" host then host.aliases else [ ]
);
in in
pkgs.writeText "${domain}" ( pkgs.writeText "${domain}" (
builtins.concatStringsSep "\n" (preamble ++ (lib.map makeHost hosts) ++ [ "" ]) builtins.concatStringsSep "\n" (preamble ++ (lib.flatten (lib.map makeHost hosts)) ++ [ "" ])
); );
in in
lib.mapAttrs lib.mapAttrs
+1
View File
@@ -15,6 +15,7 @@
(name: value: { (name: value: {
inherit name; inherit name;
address = builtins.getAttr netAttr value; address = builtins.getAttr netAttr value;
aliases = lib.optionals (builtins.hasAttr "aliases" value) (builtins.getAttr "aliases" value);
}) })
( (
lib.filterAttrs ( lib.filterAttrs (
+2 -1
View File
@@ -13,7 +13,8 @@
"ip": "10.42.1.4", "ip": "10.42.1.4",
"pubkey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEBecZUva9OnZuXLaBun6/1ITo5f9p0YMLPD+q0egLRS", "pubkey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEBecZUva9OnZuXLaBun6/1ITo5f9p0YMLPD+q0egLRS",
"external": true, "external": true,
"ts": "100.119.228.115" "ts": "100.119.228.115",
"aliases": [ "s3" ]
}, },
"exodus": { "exodus": {
"ip": null, "ip": null,