nixos-config/hosts/nuc/modules/networks/default.nix

45 lines
931 B
Nix
Raw Normal View History

2023-05-19 11:42:43 +02:00
{ ... }:
2023-01-23 23:35:44 +01:00
{
networking = {
2023-04-06 22:31:45 +02:00
hostName = "nuc";
2023-09-19 13:47:08 +02:00
domain = "rfive.de";
2023-01-23 23:35:44 +01:00
useNetworkd = true;
2023-04-12 15:06:17 +02:00
enableIPv6 = true;
2023-10-26 12:12:45 +02:00
nftables.enable = true;
2023-12-12 17:44:28 +01:00
firewall = {
extraInputRules = ''
ip saddr 192.168.0.0/16 tcp dport 19531 accept comment "Allow journald gateway access from local networks"
'';
};
2023-01-23 23:35:44 +01:00
};
2023-04-27 18:11:10 +02:00
services.resolved = {
enable = true;
2024-03-10 19:52:52 +01:00
# dnssec = "allow-downgrade";
fallbackDns = [
"9.9.9.9"
"149.112.112.112"
"2620:fe::fe"
"2620:fe::9"
];
2024-03-11 12:40:04 +01:00
extraConfig = ''
[Resolve]
DNSStubListener=no
'';
2023-04-27 18:11:10 +02:00
};
2023-01-23 23:35:44 +01:00
systemd.network = {
enable = true;
networks."10-loopback" = {
matchConfig.Name = "lo";
linkConfig.RequiredForOnline = false;
};
networks."10-wired" = {
matchConfig.Name = "eno1";
networkConfig = {
DHCP = "yes";
2023-12-27 22:22:42 +01:00
LLDP = true;
EmitLLDP = "nearest-bridge";
2023-01-23 23:35:44 +01:00
};
};
};
}