diff options
Diffstat (limited to 'nixpkgs/nixos/modules/services/network-filesystems/nfsd.nix')
-rw-r--r-- | nixpkgs/nixos/modules/services/network-filesystems/nfsd.nix | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/nixpkgs/nixos/modules/services/network-filesystems/nfsd.nix b/nixpkgs/nixos/modules/services/network-filesystems/nfsd.nix index c9e1cbcbbda4..c40bcf28c28f 100644 --- a/nixpkgs/nixos/modules/services/network-filesystems/nfsd.nix +++ b/nixpkgs/nixos/modules/services/network-filesystems/nfsd.nix @@ -26,7 +26,7 @@ in enable = mkOption { type = types.bool; default = false; - description = lib.mdDoc '' + description = '' Whether to enable the kernel's NFS server. ''; }; @@ -34,7 +34,7 @@ in extraNfsdConfig = mkOption { type = types.str; default = ""; - description = lib.mdDoc '' + description = '' Extra configuration options for the [nfsd] section of /etc/nfs.conf. ''; }; @@ -42,7 +42,7 @@ in exports = mkOption { type = types.lines; default = ""; - description = lib.mdDoc '' + description = '' Contents of the /etc/exports file. See {manpage}`exports(5)` for the format. ''; @@ -51,7 +51,7 @@ in hostName = mkOption { type = types.nullOr types.str; default = null; - description = lib.mdDoc '' + description = '' Hostname or address on which NFS requests will be accepted. Default is all. See the {option}`-H` option in {manpage}`nfsd(8)`. @@ -61,7 +61,7 @@ in nproc = mkOption { type = types.int; default = 8; - description = lib.mdDoc '' + description = '' Number of NFS server threads. Defaults to the recommended value of 8. ''; }; @@ -69,14 +69,14 @@ in createMountPoints = mkOption { type = types.bool; default = false; - description = lib.mdDoc "Whether to create the mount points in the exports file at startup time."; + description = "Whether to create the mount points in the exports file at startup time."; }; mountdPort = mkOption { type = types.nullOr types.int; default = null; example = 4002; - description = lib.mdDoc '' + description = '' Use fixed port for rpc.mountd, useful if server is behind firewall. ''; }; @@ -85,7 +85,7 @@ in type = types.nullOr types.int; default = null; example = 4001; - description = lib.mdDoc '' + description = '' Use a fixed port for the NFS lock manager kernel module (`lockd/nlockmgr`). This is useful if the NFS server is behind a firewall. @@ -96,7 +96,7 @@ in type = types.nullOr types.int; default = null; example = 4000; - description = lib.mdDoc '' + description = '' Use a fixed port for {command}`rpc.statd`. This is useful if the NFS server is behind a firewall. ''; @@ -113,25 +113,6 @@ in config = mkIf cfg.enable { - services.nfs.extraConfig = '' - [nfsd] - threads=${toString cfg.nproc} - ${optionalString (cfg.hostName != null) "host=${cfg.hostName}"} - ${cfg.extraNfsdConfig} - - [mountd] - ${optionalString (cfg.mountdPort != null) "port=${toString cfg.mountdPort}"} - - [statd] - ${optionalString (cfg.statdPort != null) "port=${toString cfg.statdPort}"} - - [lockd] - ${optionalString (cfg.lockdPort != null) '' - port=${toString cfg.lockdPort} - udp-port=${toString cfg.lockdPort} - ''} - ''; - services.rpcbind.enable = true; boot.supportedFilesystems = [ "nfs" ]; # needed for statd and idmapd |