Compare commits

...

2 commits

Author SHA1 Message Date
aec8ca6d33
bifrost: dns shenanigans 2024-12-08 15:28:53 +05:30
3b6695d25b
DNS shenanigans 2024-12-08 15:28:42 +05:30
4 changed files with 9 additions and 33 deletions

View file

@ -12,11 +12,11 @@
enable = true; enable = true;
matchConfig = { matchConfig = {
Type = "ether"; Type = "ether";
Name = "e*";
}; };
networkConfig = { networkConfig = {
DHCP = "yes"; DHCP = "yes";
IPv4Forwarding = "yes"; IPv4Forwarding = "yes";
Domains = [ "~." ];
}; };
dhcpV4Config = { dhcpV4Config = {
UseDomains = true; UseDomains = true;
@ -29,16 +29,8 @@
}; };
}; };
services.resolved = { services.resolved.enable = true;
enable = true;
domains = [ "~." ];
fallbackDns = [ ];
};
networking = { networking = {
nameservers = [
"10.10.10.1"
];
useDHCP = lib.mkDefault false; useDHCP = lib.mkDefault false;
useNetworkd = true; useNetworkd = true;
}; };

View file

@ -39,6 +39,7 @@ let wireguard-peers = import ../../shared/wireguard-peers.nix { noEndpoints = tr
}; };
networkConfig = { networkConfig = {
DNS = "10.10.10.1"; DNS = "10.10.10.1";
Domains = [ "labs.adtya.xyz" ];
Address = [ Address = [
"${config.nodeconfig.facts.wireguard-ip}/24" "${config.nodeconfig.facts.wireguard-ip}/24"
]; ];

View file

@ -1,12 +1,6 @@
{ lib, ... }: { { lib, ... }: {
imports = [ ./wireguard.nix ]; imports = [ ./wireguard.nix ];
services.resolved = {
enable = true;
domains = [ "~." ];
fallbackDns = [ ];
};
systemd = { systemd = {
network = { network = {
enable = true; enable = true;
@ -58,6 +52,7 @@
}; };
networkConfig = { networkConfig = {
DHCP = "yes"; DHCP = "yes";
Domains = [ "~." ];
}; };
dhcpV4Config = { dhcpV4Config = {
UseDomains = true; UseDomains = true;
@ -75,6 +70,7 @@
networkConfig = { networkConfig = {
DHCP = "yes"; DHCP = "yes";
IgnoreCarrierLoss = "3s"; IgnoreCarrierLoss = "3s";
Domains = [ "~." ];
}; };
dhcpV4Config = { dhcpV4Config = {
UseDomains = true; UseDomains = true;
@ -91,20 +87,10 @@
}; };
}; };
services.resolved.enable = true;
networking = { networking = {
nameservers = [
"10.10.10.1"
];
useDHCP = lib.mkDefault false; useDHCP = lib.mkDefault false;
extraHosts = '' useNetworkd = true;
10.10.10.1 Bifrost
10.10.10.2 Skipper
10.10.10.10 Rico0
10.10.10.11 Rico1
10.10.10.12 Rico2
10.10.10.13 Wynne
10.10.10.14 Layne
'';
firewall = { firewall = {
allowedTCPPorts = [ allowedTCPPorts = [

View file

@ -7,11 +7,7 @@ let wireguard-peers = import ../../shared/wireguard-peers.nix { }; in {
group = config.users.users.systemd-network.group; group = config.users.users.systemd-network.group;
}; };
}; };
networking = { networking.firewall.trustedInterfaces = [ "Homelab" ];
firewall = {
trustedInterfaces = [ "Homelab" ];
};
};
systemd.network = { systemd.network = {
enable = true; enable = true;
netdevs."99-Homelab" = { netdevs."99-Homelab" = {
@ -33,6 +29,7 @@ let wireguard-peers = import ../../shared/wireguard-peers.nix { }; in {
}; };
networkConfig = { networkConfig = {
DNS = "10.10.10.1"; DNS = "10.10.10.1";
Domains = [ "labs.adtya.xyz" ];
Address = [ Address = [
"${config.nodeconfig.facts.wireguard-ip}/24" "${config.nodeconfig.facts.wireguard-ip}/24"
]; ];