{ config, lib, ... }: { services.nfs.server.enable = true; fileSystems."/export/desktop" = lib.mkIf (!config.c3moc.switchNfs) { device = "/mnt/zvault/desktop"; options = [ "bind" ]; }; services.nfs.server.exports = lib.mkIf (!config.c3moc.switchNfs) '' /export 192.168.0.20(rw,fsid=0,no_subtree_check) 192.168.1.39(ro,nohide,insecure,no_subtree_check,all_squash,anonuid=1000,anongid=1000) /export/desktop 192.168.0.20(rw,nohide,insecure,no_subtree_check) 192.168.1.39(ro,nohide,insecure,no_subtree_check,all_squash,anonuid=1000,anongid=1000) ''; networking.firewall.allowedTCPPorts = [ 111 662 892 2049 32769 32803 38467 ]; networking.firewall.allowedUDPPorts = [ 111 662 892 2049 32769 32803 38467 ]; }