chore: homelab - use proxyGateway's dns service

This commit is contained in:
Ryan Yin
2026-03-26 13:29:29 +08:00
parent d2590d3653
commit f398c44307
5 changed files with 16 additions and 9 deletions

View File

@@ -58,7 +58,8 @@ in
matchConfig.Name = [ iface ];
networkConfig = {
Address = [ ipv4WithMask ];
DNS = nameservers;
# DNS = nameservers;
DNS = [ proxyGateway ];
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
LinkLocalAddressing = "ipv6";

View File

@@ -51,7 +51,8 @@ in
matchConfig.Name = [ iface ];
networkConfig = {
Address = [ ipv4WithMask ];
DNS = nameservers;
# DNS = nameservers;
DNS = [ proxyGateway ];
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
LinkLocalAddressing = "ipv6";

View File

@@ -60,7 +60,8 @@ in
matchConfig.Name = [ iface ];
networkConfig = {
Address = [ ipv4WithMask ];
DNS = nameservers;
# DNS = nameservers;
DNS = [ proxyGateway ];
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
LinkLocalAddressing = "ipv6";

View File

@@ -3,11 +3,13 @@
hostName,
networking,
...
}: let
}:
let
inherit (networking) proxyGateway proxyGateway6 nameservers;
inherit (networking.hostsAddr.${hostName}) iface ipv4;
ipv4WithMask = "${ipv4}/24";
in {
in
{
# supported file systems, so we can mount any removable disks with these filesystems
boot.supportedFilesystems = [
"ext4"
@@ -29,10 +31,11 @@ in {
systemd.network.enable = true;
systemd.network.networks."10-${iface}" = {
matchConfig.Name = [iface];
matchConfig.Name = [ iface ];
networkConfig = {
Address = [ipv4WithMask];
DNS = nameservers;
Address = [ ipv4WithMask ];
# DNS = nameservers;
DNS = [ proxyGateway ];
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
LinkLocalAddressing = "ipv6";

View File

@@ -110,7 +110,8 @@ in
matchConfig.Name = [ "ovsbr1" ];
networkConfig = {
Address = [ ipv4WithMask ];
DNS = nameservers;
# DNS = nameservers;
DNS = [ proxyGateway ];
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
LinkLocalAddressing = "ipv6";