From 66bbbc205daec5d751b4414da8f3b27f95caab6f Mon Sep 17 00:00:00 2001 From: Rickard Nilsson Date: Tue, 16 Sep 2014 10:51:05 +0200 Subject: [PATCH] nixos/nfs: Fix configuration merge --- nixos/modules/tasks/filesystems/nfs.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/modules/tasks/filesystems/nfs.nix b/nixos/modules/tasks/filesystems/nfs.nix index c902b9e0790..16752ce7e1b 100644 --- a/nixos/modules/tasks/filesystems/nfs.nix +++ b/nixos/modules/tasks/filesystems/nfs.nix @@ -54,12 +54,16 @@ in ###### implementation - config = mkIf (any (fs: fs == "nfs" || fs == "nfs4") config.boot.supportedFilesystems) ({ + config = mkIf (any (fs: fs == "nfs" || fs == "nfs4") config.boot.supportedFilesystems) { services.rpcbind.enable = true; system.fsPackages = [ pkgs.nfsUtils ]; + boot.extraModprobeConfig = mkIf (cfg.lockdPort != null) '' + options lockd nlm_udpport=${toString cfg.lockdPort} nlm_tcpport=${toString cfg.lockdPort} + ''; + boot.kernelModules = [ "sunrpc" ]; boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ]; @@ -117,9 +121,5 @@ in serviceConfig.Restart = "always"; }; - } // mkIf (cfg.lockdPort != null) { - boot.extraModprobeConfig = '' - options lockd nlm_udpport=${toString cfg.lockdPort} nlm_tcpport=${toString cfg.lockdPort} - ''; - }); + }; }