Author: eelco
Date: 2010-06-08 16:14:41 +0000 (Tue, 08 Jun 2010)
New Revision: 22189

You can view the changes in this commit at:
   https://svn.nixos.org/viewvc/nix?rev=22189&view=rev

Modified:
   nixos/branches/boot-order/modules/services/network-filesystems/nfs-kernel.nix
   nixos/branches/boot-order/tests/nfs.nix

Log:
* Set `services.nfsKernel.client.enable' automatically if there is a
  filesystem with type "nfs" or "nfs4".


Changes:

Modified: 
nixos/branches/boot-order/modules/services/network-filesystems/nfs-kernel.nix
===================================================================
--- 
nixos/branches/boot-order/modules/services/network-filesystems/nfs-kernel.nix   
    2010-06-08 16:02:22 UTC (rev 22188)
+++ 
nixos/branches/boot-order/modules/services/network-filesystems/nfs-kernel.nix   
    2010-06-08 16:14:41 UTC (rev 22189)
@@ -21,7 +21,7 @@
     services.nfsKernel = {
 
       client.enable = mkOption {
-        default = false;
+        default = any (fs: fs.fsType == "nfs" || fs.fsType == "nfs4") 
config.fileSystems;
         description = ''
           Whether to enable the kernel's NFS client daemons.
         '';

Modified: nixos/branches/boot-order/tests/nfs.nix
===================================================================
--- nixos/branches/boot-order/tests/nfs.nix     2010-06-08 16:02:22 UTC (rev 
22188)
+++ nixos/branches/boot-order/tests/nfs.nix     2010-06-08 16:14:41 UTC (rev 
22189)
@@ -5,8 +5,7 @@
   nodes =
     { client = 
         { config, pkgs, ... }:
-        { services.nfsKernel.client.enable = true;
-          fileSystems = pkgs.lib.mkOverride 50 {} 
+        { fileSystems = pkgs.lib.mkOverride 50 {} 
             [ { mountPoint = "/data";
                 device = "server:/data";
                 fsType = "nfs";

_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to