Files
nixos-config/modules/services/nas/nfs.nix
T
2026-07-22 10:57:58 +02:00

24 lines
574 B
Nix

{
config,
pkgs,
lib,
...
}: {
# enable nfs
services.nfs.server = rec {
enable = true;
exports = ''
/export 192.168.2.0/24(rw,fsid=0,no_subtree_check),10.10.10.2/32(ro,fsid=0,no_subtree_check)
/export/Pluto 192.168.2.0/24(rw,no_subtree_check),10.10.10.2/32(ro,no_subtree_check)
/export/Mars 192.168.2.0/24(rw,no_subtree_check),10.10.10.2/32(ro,no_subtree_check)
'';
createMountPoints = true;
};
# open the firewall
networking.firewall = {
interfaces.ens18 = {
allowedTCPPorts = [2049];
};
};
}