mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 05:13:10 +01:00
48 lines
978 B
Nix
48 lines
978 B
Nix
{ ... }:
|
|
{
|
|
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" ];
|
|
routes = [{
|
|
routeConfig.Gateway = "192.168.42.1";
|
|
}];
|
|
networkConfig = {
|
|
DNS = [
|
|
"192.168.42.1"
|
|
];
|
|
LLDP = true;
|
|
EmitLLDP = "nearest-bridge";
|
|
};
|
|
};
|
|
};
|
|
}
|