mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-14 00:22:39 +02:00
chore: homelab - use proxyGateway's dns service
This commit is contained in:
@@ -58,7 +58,8 @@ in
|
|||||||
matchConfig.Name = [ iface ];
|
matchConfig.Name = [ iface ];
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
Address = [ ipv4WithMask ];
|
Address = [ ipv4WithMask ];
|
||||||
DNS = nameservers;
|
# DNS = nameservers;
|
||||||
|
DNS = [ proxyGateway ];
|
||||||
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
|
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
|
||||||
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
|
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
|
||||||
LinkLocalAddressing = "ipv6";
|
LinkLocalAddressing = "ipv6";
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ in
|
|||||||
matchConfig.Name = [ iface ];
|
matchConfig.Name = [ iface ];
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
Address = [ ipv4WithMask ];
|
Address = [ ipv4WithMask ];
|
||||||
DNS = nameservers;
|
# DNS = nameservers;
|
||||||
|
DNS = [ proxyGateway ];
|
||||||
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
|
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
|
||||||
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
|
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
|
||||||
LinkLocalAddressing = "ipv6";
|
LinkLocalAddressing = "ipv6";
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ in
|
|||||||
matchConfig.Name = [ iface ];
|
matchConfig.Name = [ iface ];
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
Address = [ ipv4WithMask ];
|
Address = [ ipv4WithMask ];
|
||||||
DNS = nameservers;
|
# DNS = nameservers;
|
||||||
|
DNS = [ proxyGateway ];
|
||||||
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
|
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
|
||||||
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
|
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
|
||||||
LinkLocalAddressing = "ipv6";
|
LinkLocalAddressing = "ipv6";
|
||||||
|
|||||||
@@ -3,11 +3,13 @@
|
|||||||
hostName,
|
hostName,
|
||||||
networking,
|
networking,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (networking) proxyGateway proxyGateway6 nameservers;
|
inherit (networking) proxyGateway proxyGateway6 nameservers;
|
||||||
inherit (networking.hostsAddr.${hostName}) iface ipv4;
|
inherit (networking.hostsAddr.${hostName}) iface ipv4;
|
||||||
ipv4WithMask = "${ipv4}/24";
|
ipv4WithMask = "${ipv4}/24";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# supported file systems, so we can mount any removable disks with these filesystems
|
# supported file systems, so we can mount any removable disks with these filesystems
|
||||||
boot.supportedFilesystems = [
|
boot.supportedFilesystems = [
|
||||||
"ext4"
|
"ext4"
|
||||||
@@ -29,10 +31,11 @@ in {
|
|||||||
systemd.network.enable = true;
|
systemd.network.enable = true;
|
||||||
|
|
||||||
systemd.network.networks."10-${iface}" = {
|
systemd.network.networks."10-${iface}" = {
|
||||||
matchConfig.Name = [iface];
|
matchConfig.Name = [ iface ];
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
Address = [ipv4WithMask];
|
Address = [ ipv4WithMask ];
|
||||||
DNS = nameservers;
|
# DNS = nameservers;
|
||||||
|
DNS = [ proxyGateway ];
|
||||||
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
|
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
|
||||||
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
|
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
|
||||||
LinkLocalAddressing = "ipv6";
|
LinkLocalAddressing = "ipv6";
|
||||||
|
|||||||
@@ -110,7 +110,8 @@ in
|
|||||||
matchConfig.Name = [ "ovsbr1" ];
|
matchConfig.Name = [ "ovsbr1" ];
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
Address = [ ipv4WithMask ];
|
Address = [ ipv4WithMask ];
|
||||||
DNS = nameservers;
|
# DNS = nameservers;
|
||||||
|
DNS = [ proxyGateway ];
|
||||||
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
|
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
|
||||||
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
|
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguraton (SLAAC)
|
||||||
LinkLocalAddressing = "ipv6";
|
LinkLocalAddressing = "ipv6";
|
||||||
|
|||||||
Reference in New Issue
Block a user