mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 07:29:23 +08:00
modules.services.nfs: remove rpcbind, remove firewall rule
This commit is contained in:
@@ -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 ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user