mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-28 17:38:30 +02:00
fujitsu: configure network and impermanence
This commit is contained in:
parent
0780cdefc8
commit
0ef795ca18
4 changed files with 68 additions and 19 deletions
47
hosts/fujitsu/modules/networks/default.nix
Normal file
47
hosts/fujitsu/modules/networks/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ ... }:
|
||||
{
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue