add old main and move dns config to options.nix

This commit is contained in:
Satria 2026-03-06 15:12:36 +07:00
commit ccce7f7308
2 changed files with 16 additions and 15 deletions

View file

@ -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) 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 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. domain = "satr14.my.id"; # root domain for dns, ssl certs, reverse proxy, etc.
disks = { disks = {
share = "/dev/disk/by-uuid/ac61f6c8-ac20-41dd-ba93-41c4a225dc98"; # disk for nas share 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 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 = { rice = {

View file

@ -1,17 +1,4 @@
{ homelab, ... }: let { 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 = [ blacklist = [
"https://adaway.org/hosts.txt" "https://adaway.org/hosts.txt"
"https://adguardteam.github.io/HostlistsRegistry/assets/filter_10.txt" "https://adguardteam.github.io/HostlistsRegistry/assets/filter_10.txt"
@ -61,7 +48,7 @@ in {
enabled = true; enabled = true;
domain = builtins.elemAt e 0; domain = builtins.elemAt e 0;
answer = builtins.elemAt e 1; answer = builtins.elemAt e 1;
}) rewrites; }) homelab.records;
}; };
filters = map (url: { enabled = true; url = url; }) blacklist; filters = map (url: { enabled = true; url = url; }) blacklist;
whitelist_filters = map (url: { enabled = true; url = url; }) whitelist; whitelist_filters = map (url: { enabled = true; url = url; }) whitelist;