feat: update blocky to have control over *.cpatino.com domains
All checks were successful
ci / treefmt (push) Successful in 4m16s

This commit is contained in:
Ceferino Patino 2026-06-03 00:41:16 -05:00
commit 6193908f99
Signed by: c4patino
SSH key fingerprint: SHA256:Wu+cU1t+7zVT9wzew/4meNmeulo66NzMqc22MdDBgXI

View file

@ -5,7 +5,7 @@
pkgs,
...
}: let
inherit (lib) mkIf mapAttrsToList listToAttrs;
inherit (lib) mkIf mapAttrsToList listToAttrs filterAttrs flatten;
inherit (lib.${namespace}) getAttrByNamespace resolveHostIP flattenHostServices hostHasService getServicePort;
inherit (config.networking) hostName;
@ -108,11 +108,25 @@ in {
customDNS = {
customTTL = "1h";
mapping =
networkServices
|> mapAttrsToList (name: svc: {
name = "${name}.yumeami.sh";
value = resolveHostIP networkCfg.devices svc.host;
})
[
(
networkServices
|> filterAttrs (_: svc: svc.internal)
|> mapAttrsToList (name: svc: {
name = "${name}.yumeami.sh";
value = resolveHostIP networkCfg.devices svc.host;
})
)
(
networkServices
|> filterAttrs (_: svc: svc.public)
|> mapAttrsToList (name: svc: {
name = "${name}.cpatino.com";
value = resolveHostIP networkCfg.devices hostName;
})
)
]
|> flatten
|> listToAttrs;
};
};