anchor.diff:  
               description = "Kernel NFS server - mount daemon";
   
  -            startOn = "started portmap and started nfs-kernel-exports";
  -            stopOn = "stopped nfs-kernel-nfsd";
  +            startOn = "starting nfs-kernel-exports or started portmap";
  +            stopOn = "stopped nfs-kernel-statd";
   
               daemonType = "fork";
   
  
positive.code:   cfg = config.services.nfsKernel;
  
    exports = pkgs.writeText "exports" cfg.server.exports;
  
  in
  
  
negative.code: 
              description = "Kernel NFS server";
  
              startOn = "started network-interfaces and started portmap";
  
              postStart =
                ''
                  # exports file is ${exports}
                  # keep this comment so that this job is restarted whenever exports changes!
                  exportfs -ra
                '';
            };
          }
  
        // optionalAttrs cfg.server.enable
          { nfs_kernel_nfsd =
            { name = "nfs-kernel-nfsd";
  
              description = "Kernel NFS server";
  
              startOn = "starting nfs-kernel-exports or started portmap";
              stopOn = "stopped nfs-kernel-statd or stopping portmap";
  
              preStart =
                ''
                  export PATH=${pkgs.nfsUtils}/sbin:$PATH
                  mkdir -p /var/lib/nfs
  
                  # Create a state directory required by NFSv4.
                  mkdir -p /var/lib/nfs/v4recovery
  
                  # rpc.nfsd needs the kernel support
                  ${config.system.sbin.modprobe}/sbin/modprobe nfsd || true
  
                  ${pkgs.sysvtools}/bin/mountpoint -q /proc/fs/nfsd \
  