treying to get nfs to work

This commit is contained in:
Geir Okkenhaug Jerstad 2025-06-07 15:29:28 +00:00
parent 2d3728f28b
commit 9bfddf14ce
2 changed files with 22 additions and 16 deletions

View file

@ -41,7 +41,11 @@
# nameservers = [ "10.0.0.14" "10.0.0.138" "8.8.8.8" ]; # Pi-hole, router, Google DNS fallback # nameservers = [ "10.0.0.14" "10.0.0.138" "8.8.8.8" ]; # Pi-hole, router, Google DNS fallback
# Additional firewall ports for file server services # Additional firewall ports for file server services
firewall.allowedTCPPorts = [ firewall = {
# Trust the Tailscale interface for mesh network access
trustedInterfaces = [ "tailscale0" ];
allowedTCPPorts = [
22 # SSH 22 # SSH
111 # NFS portmapper 111 # NFS portmapper
2049 # NFS 2049 # NFS
@ -50,7 +54,7 @@
# Add additional ports here as needed # Add additional ports here as needed
]; ];
firewall.allowedUDPPorts = [ allowedUDPPorts = [
22 # SSH 22 # SSH
111 # NFS portmapper 111 # NFS portmapper
2049 # NFS 2049 # NFS
@ -58,4 +62,5 @@
138 # NetBIOS Datagram Service 138 # NetBIOS Datagram Service
]; ];
}; };
};
} }

View file

@ -7,8 +7,9 @@
services.nfs.server = { services.nfs.server = {
enable = true; enable = true;
# Export the storage directory (ZFS dataset) # Export the storage directory (ZFS dataset)
# Allow access from both local network and Tailscale network
exports = '' exports = ''
/mnt/storage 10.0.0.0/24(rw,sync,no_subtree_check,no_root_squash) /mnt/storage 10.0.0.0/24(rw,sync,no_subtree_check,no_root_squash) 100.64.0.0/10(rw,sync,no_subtree_check,no_root_squash)
''; '';
# Create exports on startup # Create exports on startup
createMountPoints = true; createMountPoints = true;