diff --git a/lib/options.nix b/lib/options.nix index a5ae624..1bd965b 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -13,12 +13,26 @@ swapfile = 8 * 1024; # swapfile size in MB, set to 0 to disable (only used for server, desktop will use swap partition instead) resume-dev = "/dev/disk/by-uuid/1721721a-bb5a-4166-a077-9500d30be2ac"; # set to swap partition to enable hibernation, e.g. /dev/disk/by-uuid/1721721a-bb5a-4166-a077-9500d30be2ac - homelab = { + homelab = rec { domain = "satr14.my.id"; # root domain for dns, ssl certs, reverse proxy, etc. disks = { share = "/dev/disk/by-uuid/ac61f6c8-ac20-41dd-ba93-41c4a225dc98"; # disk for nas share data = "/dev/disk/by-uuid/a5752dd6-092d-484c-969c-2fdc7cb4a5f0"; # disk for app data }; + records = [ + [ "router.dns.${domain}" "10.3.14.1" ] + [ "workspace.dns.${domain}" "10.3.14.57" ] + [ "server.dns.${domain}" "10.3.14.69" ] + [ "home.dns.${domain}" "10.3.14.235" ] + + [ "main.dns.${domain}" "10.3.14.215" ] # this machine + [ "old-main.dns.${domain}" "10.3.14.42" ] # old main machine for connecting while migrating + [ "proxy.${domain}" "main.dns.${domain}" ] + [ "*.proxy.${domain}" "proxy.${domain}" ] + + # [ "lancache.steamcontent.com" "main.dns.${domain}" ] + # [ "steam.cache.lancache.net" "main.dns.${domain}" ] + ]; }; rice = { diff --git a/modules/system/homelab/dns.nix b/modules/system/homelab/dns.nix index 907645e..5624a07 100644 --- a/modules/system/homelab/dns.nix +++ b/modules/system/homelab/dns.nix @@ -1,17 +1,4 @@ { homelab, ... }: let - rewrites = [ - [ "router.dns.${homelab.domain}" "10.3.14.1" ] - [ "workspace.dns.${homelab.domain}" "10.3.14.57" ] - [ "server.dns.${homelab.domain}" "10.3.14.69" ] - [ "home.dns.${homelab.domain}" "10.3.14.235" ] - - [ "main.dns.${homelab.domain}" "10.3.14.215" ] # this machine - [ "proxy.${homelab.domain}" "main.dns.${homelab.domain}" ] - [ "*.proxy.${homelab.domain}" "proxy.${homelab.domain}" ] - - # [ "lancache.steamcontent.com" "main.dns.${homelab.domain}" ] - # [ "steam.cache.lancache.net" "main.dns.${homelab.domain}" ] - ]; blacklist = [ "https://adaway.org/hosts.txt" "https://adguardteam.github.io/HostlistsRegistry/assets/filter_10.txt" @@ -61,7 +48,7 @@ in { enabled = true; domain = builtins.elemAt e 0; answer = builtins.elemAt e 1; - }) rewrites; + }) homelab.records; }; filters = map (url: { enabled = true; url = url; }) blacklist; whitelist_filters = map (url: { enabled = true; url = url; }) whitelist;