{ vars, lib, ... }: { imports = [ ../beszel/enable-agent.nix ../services/zfs/enable-service.nix ]; boot.zfs.extraPools = [ (lib.removePrefix "/" vars.storageRoot) ]; systemd.services.nfs-server = { after = [ "zfs-mount.service" ]; requires = [ "zfs-mount.service" ]; }; services.nfs.server = { enable = true; exports = '' ${vars.storageRoot}/${vars.nfsShares.dockerConfig.subpath} ${vars.lanCidr}(rw,sync,no_subtree_check,no_root_squash) ${vars.storageRoot}/${vars.nfsShares.dockerVolumes.subpath} ${vars.lanCidr}(rw,sync,no_subtree_check,no_root_squash) ${vars.storageRoot}/${vars.nfsShares.dockerDatabases.subpath} ${vars.lanCidr}(rw,sync,no_subtree_check,no_root_squash) ${vars.storageRoot}/${vars.nfsShares.nextcloudData.subpath} ${vars.lanCidr}(rw,sync,no_subtree_check,no_root_squash) ${vars.storageRoot}/${vars.nfsShares.raspiVolumes.subpath} ${vars.lanCidr}(rw,sync,no_subtree_check,no_root_squash) ''; }; networking.firewall.allowedTCPPorts = [ vars.ports.nfsRpcbind vars.ports.nfsd ]; }