mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
* Remove the ‘services.nfs.client.enable’ flag; use
‘boot.supportedFilesystems = [ "nfs" ]’ if needed. svn path=/nixos/trunk/; revision=33356
This commit is contained in:
parent
293e3a784d
commit
2a135eb4d4
3 changed files with 9 additions and 22 deletions
|
@ -69,7 +69,7 @@ in
|
||||||
|
|
||||||
services.rpcbind.enable = true;
|
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 ];
|
environment.systemPackages = [ pkgs.nfsUtils ];
|
||||||
|
|
||||||
|
|
|
@ -184,12 +184,6 @@ in
|
||||||
''
|
''
|
||||||
# Ensure that this job is restarted when fstab changed:
|
# Ensure that this job is restarted when fstab changed:
|
||||||
# ${fstab}
|
# ${fstab}
|
||||||
|
|
||||||
${optionalString config.services.nfs.client.enable ''
|
|
||||||
ensure statd || true
|
|
||||||
ensure idmapd || true
|
|
||||||
''}
|
|
||||||
|
|
||||||
echo "mounting filesystems..."
|
echo "mounting filesystems..."
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -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
|
###### implementation
|
||||||
|
|
||||||
config = mkIf config.services.nfs.client.enable {
|
config = mkIf (any (fs: fs == "nfs" || fs == "nfs4") config.boot.supportedFilesystems) {
|
||||||
|
|
||||||
services.rpcbind.enable = true;
|
services.rpcbind.enable = true;
|
||||||
|
|
||||||
|
@ -63,6 +49,13 @@ in
|
||||||
|
|
||||||
environment.etc = singleton idmapdConfFile;
|
environment.etc = singleton idmapdConfFile;
|
||||||
|
|
||||||
|
# Ensure that statd and idmapd are started before mountall.
|
||||||
|
jobs.mountall.preStart =
|
||||||
|
''
|
||||||
|
ensure statd || true
|
||||||
|
ensure idmapd || true
|
||||||
|
'';
|
||||||
|
|
||||||
jobs.statd =
|
jobs.statd =
|
||||||
{ description = "Kernel NFS server - Network Status Monitor";
|
{ description = "Kernel NFS server - Network Status Monitor";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue