feat: update blocky to have control over *.cpatino.com domains
All checks were successful
ci / treefmt (push) Successful in 4m16s
All checks were successful
ci / treefmt (push) Successful in 4m16s
This commit is contained in:
parent
8da48c8804
commit
6193908f99
1 changed files with 20 additions and 6 deletions
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue