diff --git a/modules/services/network-filesystems/nfs-kernel.nix b/modules/services/network-filesystems/nfs-kernel.nix index 1b4fa927123..ba6b901b961 100644 --- a/modules/services/network-filesystems/nfs-kernel.nix +++ b/modules/services/network-filesystems/nfs-kernel.nix @@ -10,19 +10,6 @@ let exports = pkgs.writeText "exports" cfg.server.exports; -/* - Description at http://nfs.sourceforge.net/nfs-howto/ar01s03.html : - - "If your distribution does not include them in the startup scripts, then then - you should add them, configured to start in the following order: - - rpc.portmap - rpc.mountd, rpc.nfsd - rpc.statd, rpc.lockd (if necessary), and - rpc.rquotad" -*/ - - in { @@ -106,7 +93,7 @@ in { description = "Kernel NFS server"; startOn = "started portmap"; - stopOn = "stopped statd or stopping portmap"; + stopOn = "stopped statd"; preStart = '' @@ -166,7 +153,7 @@ in "started mountd and started nfsd" else "started portmap"; - stopOn = "stopping nfsd or stopping portmap"; + stopOn = "stopping nfsd"; preStart = '' diff --git a/modules/services/networking/portmap.nix b/modules/services/networking/portmap.nix index 0b03c6ccdb4..142e057c7de 100644 --- a/modules/services/networking/portmap.nix +++ b/modules/services/networking/portmap.nix @@ -51,6 +51,8 @@ in config = mkIf config.services.portmap.enable { + environment.systemPackages = [ portmap ]; + users.extraUsers = singleton { name = "portmap"; inherit uid;