DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: 5e3bf6ea5e8fd26bcced2602d24da52ef4d60ab3 nix-arta/lib/util.nix -rw-r--r-- 476 bytes
5e3bf6eaJonni Liljamo feat(system/hosts/dns): add entries for each host 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{lib, ...}: let
  hostnameIPv4 = {
    "sqbuilds" = "10.1.1.50";
    "dns" = "10.1.2.3";
    "metrics" = "10.1.2.5";
    "proxy" = "10.1.2.10";
    "auth" = "10.1.2.12";
    "cloud" = "10.1.2.15";
    "social" = "10.1.2.17";
  };
  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;
}