Assimilate hq DNS management #33

Closed
opened 2022-06-03 16:42:47 +02:00 by ehmry · 1 comment
Owner

I think this would work:

{ config, lib, ... }:
let hqHosts = import ./host-registry.nix;
in {

  services.unbound = {
    enable = true;
    settings.server = with config.networking; {
      local-zone = [ ''"${domain}." static'' ];

      local-data = lib.lists.flatten (lib.attrsets.mapAttrsToList (
        name: { ip4 ? null, ip6 ? null, ... }:
        (lib.optional (ip4 != null) ''"${name}.${domain}. IN A    ${ip4}"'') ++
        (lib.optional (ip6 != null) ''"${name}.${domain}. IN AAAA ${ip6}"''))
        hqHosts);
    };
  };

}
I think this would work: ``` nix { config, lib, ... }: let hqHosts = import ./host-registry.nix; in { services.unbound = { enable = true; settings.server = with config.networking; { local-zone = [ ''"${domain}." static'' ]; local-data = lib.lists.flatten (lib.attrsets.mapAttrsToList ( name: { ip4 ? null, ip6 ? null, ... }: (lib.optional (ip4 != null) ''"${name}.${domain}. IN A ${ip4}"'') ++ (lib.optional (ip6 != null) ''"${name}.${domain}. IN AAAA ${ip6}"'')) hqHosts); }; }; } ```
Owner

Autogenerated DNS for all machines already exists under zentralwerk.org.

hq.c3d2.de is used for many services with individual reverse proxy configurations.

Autogenerated DNS for all machines already exists under zentralwerk.org. hq.c3d2.de is used for many services with individual reverse proxy configurations.
ehmry closed this issue 2022-06-03 23:27:03 +02:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: c3d2/nix-config#33
No description provided.