DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

5e3bf6ea5e8fd26bcced2602d24da52ef4d60ab3 — Jonni Liljamo 2 months ago 9e5033e
feat(system/hosts/dns): add entries for each host
2 files changed, 23 insertions(+), 12 deletions(-)

M lib/util.nix
M systems/hosts/dns/default.nix
M lib/util.nix => lib/util.nix +5 -0
@@ 10,5 10,10 @@
  };
  getIPv4 = hostName: hostnameIPv4.${hostName};
in {
  # hostname.home.arpa = ip
  hostnameDNSEntries =
    lib.attrsets.mapAttrs'
    (name: value: lib.attrsets.nameValuePair (name + ".home.arpa") value)
    hostnameIPv4;
  getIPv4 = getIPv4;
}

M systems/hosts/dns/default.nix => systems/hosts/dns/default.nix +18 -12
@@ 1,4 1,8 @@
{...}: let
{
  artautil,
  lib,
  ...
}: let
  proxyAlias = "proxy.home.arpa";
  proxyIP = "10.1.2.10";



@@ 29,21 33,23 @@ in {
      };
      customDNS = {
        customTTL = "1h";
        mapping = {
          "${proxyAlias}" = proxyIP;
        mapping =
          {
            "${proxyAlias}" = proxyIP;

          "dns${rlUrl}" = proxyIP;
            "dns${rlUrl}" = proxyIP;

          "multi.media${rlUrl}" = proxyIP;
          "books.media${rlUrl}" = proxyIP;
          "nextcloud${rlUrl}" = proxyIP;
            "multi.media${rlUrl}" = proxyIP;
            "books.media${rlUrl}" = proxyIP;
            "nextcloud${rlUrl}" = proxyIP;

          "metrics${rlUrl}" = proxyIP;
            "metrics${rlUrl}" = proxyIP;

          "portainer${uwUrl}" = proxyIP;
          "registry${uwUrl}" = proxyIP;
          "registryui${uwUrl}" = proxyIP;
        };
            "portainer${uwUrl}" = proxyIP;
            "registry${uwUrl}" = proxyIP;
            "registryui${uwUrl}" = proxyIP;
          }
          // artautil.hostnameDNSEntries;
      };
      blocking = {
        blackLists = {