* Remove the ‘services.nfs.client.enable’ flag; use

‘boot.supportedFilesystems = [ "nfs" ]’ if needed.

svn path=/nixos/trunk/; revision=33356
This commit is contained in:
Eelco Dolstra 2012-03-22 12:24:23 +00:00
parent 293e3a784d
commit 2a135eb4d4
3 changed files with 9 additions and 22 deletions

View File

@ -69,7 +69,7 @@ in
services.rpcbind.enable = true;
services.nfs.client.enable = true; # needed for statd and idmapd
boot.supportedFilesystems = [ "nfs" ]; # needed for statd and idmapd
environment.systemPackages = [ pkgs.nfsUtils ];

View File

@ -184,12 +184,6 @@ in
''
# Ensure that this job is restarted when fstab changed:
# ${fstab}
${optionalString config.services.nfs.client.enable ''
ensure statd || true
ensure idmapd || true
''}
echo "mounting filesystems..."
'';

View File

@ -31,23 +31,9 @@ in
{
###### interface
options = {
services.nfs.client.enable = mkOption {
default = any (fs: fs.fsType == "nfs" || fs.fsType == "nfs4") config.fileSystems;
description = ''
Whether to enable support for mounting NFS filesystems.
'';
};
};
###### implementation
config = mkIf config.services.nfs.client.enable {
config = mkIf (any (fs: fs == "nfs" || fs == "nfs4") config.boot.supportedFilesystems) {
services.rpcbind.enable = true;
@ -63,6 +49,13 @@ in
environment.etc = singleton idmapdConfFile;
# Ensure that statd and idmapd are started before mountall.
jobs.mountall.preStart =
''
ensure statd || true
ensure idmapd || true
'';
jobs.statd =
{ description = "Kernel NFS server - Network Status Monitor";