Files
nix-config/hosts/nas/networking.nix
2025-01-22 17:52:48 -06:00

42 lines
737 B
Nix

{ ... }:
let
hostname = "jallen-nas";
ports = [
9000 # authentik
2342 # grafana
51820 # wireguard
];
in
{
# Networking configs
networking = {
hostName = hostname;
useNetworkd = true;
hostId = "4b501480";
# Disable Network Manager
networkmanager.enable = true;
nat = {
enable = true;
internalInterfaces = [ "ve-+" ];
externalInterface = "wlp7s0";
# Lazy IPv6 connectivity for the container
enableIPv6 = true;
};
firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = ports;
allowedUDPPorts = ports;
# always allow traffic from your Tailscale network
trustedInterfaces = [ "tailscale0" ];
};
};
}