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

46 lines
938 B
Nix
Raw Normal View History

{ ... }:
{
networking = {
hostName = "fujitsu";
domain = "rfive.de";
useNetworkd = true;
enableIPv6 = true;
nftables.enable = true;
firewall = {
extraInputRules = ''
ip saddr 192.168.0.0/16 tcp dport 19531 accept comment "Allow journald gateway access from local networks"
'';
};
};
services.resolved = {
enable = true;
fallbackDns = [
"9.9.9.9"
"149.112.112.112"
"2620:fe::fe"
"2620:fe::9"
];
};
systemd.network = {
enable = true;
networks."10-loopback" = {
matchConfig.Name = "lo";
linkConfig.RequiredForOnline = false;
};
networks."10-wired" = {
matchConfig.Name = "enp2s0";
address = [ "192.168.42.3/24" ];
networkConfig = {
DNS = [
"192.168.42.1"
];
2024-06-10 10:21:00 +02:00
Gateway = "192.168.42.1";
LLDP = true;
EmitLLDP = "nearest-bridge";
};
};
};
}