modules.services.nfs: remove rpcbind, remove firewall rule

This commit is contained in:
2025-06-13 07:49:42 +08:00
parent 746b438058
commit a7976ae167

View File

@@ -4,18 +4,13 @@ inputs:
{ type = types.attrsOf (types.nonEmptyListOf types.nonEmptyStr); default = {}; }; # export = accessLimit
config = let inherit (inputs.config.nixos.services) nfs; in inputs.lib.mkIf (nfs != {})
{
services =
services.nfs.server =
{
rpcbind.enable = true;
nfs.server =
{
enable = true;
exports =
let clientString = clients: builtins.concatStringsSep " " (builtins.map
(client: "${client}(rw,no_root_squash,sync,crossmnt)") clients);
in inputs.lib.concatLines (inputs.lib.mapAttrsToList (n: v: "${n} ${clientString v}") nfs);
};
enable = true;
exports =
let clientString = clients: builtins.concatStringsSep " " (builtins.map
(client: "${client}(rw,no_root_squash,sync,crossmnt)") clients);
in inputs.lib.concatLines (inputs.lib.mapAttrsToList (n: v: "${n} ${clientString v}") nfs);
};
networking.firewall.allowedTCPPorts = [ 2049 ];
};
}