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

55 lines
1.2 KiB
Nix
Raw Normal View History

2023-05-19 11:42:43 +02:00
{ ... }:
2023-01-23 23:35:44 +01:00
{
2024-06-22 16:27:54 +02:00
fileSystems."/media/movies" = {
device = "fujitsu.vpn.rfive.de:/movies";
fsType = "nfs";
};
fileSystems."/media/shows" = {
device = "fujitsu.vpn.rfive.de:/movies";
fsType = "nfs";
};
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;
fallbackDns = [
"9.9.9.9"
"149.112.112.112"
"2620:fe::fe"
"2620:fe::9"
];
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";
2024-04-19 11:33:54 +02:00
address = [ "192.168.42.2/24" ];
routes = [{
2024-06-10 10:21:00 +02:00
Gateway = "192.168.42.1";
2024-04-19 11:33:54 +02:00
}];
2023-01-23 23:35:44 +01:00
networkConfig = {
2024-05-13 11:59:14 +02:00
DNS = [
2024-05-24 15:59:34 +02:00
"192.168.42.1"
2024-05-13 11:59:14 +02:00
];
2023-12-27 22:22:42 +01:00
LLDP = true;
EmitLLDP = "nearest-bridge";
2024-04-10 00:31:05 +02:00
DNSSEC = false;
2023-01-23 23:35:44 +01:00
};
};
};
}