about summary refs log tree commit diff
path: root/nixos/tests/nfs.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/nfs.nix')
-rw-r--r--nixos/tests/nfs.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/tests/nfs.nix b/nixos/tests/nfs.nix
index 1992f240e7b0..0ef44f1a4890 100644
--- a/nixos/tests/nfs.nix
+++ b/nixos/tests/nfs.nix
@@ -6,7 +6,8 @@ let
     { pkgs, ... }:
     { fileSystems = pkgs.lib.mkVMOverride
         [ { mountPoint = "/data";
-            device = "server:/data";
+            # nfs4 exports the export with fsid=0 as a virtual root directory
+            device = if (version == 4) then "server:/" else "server:/data";
             fsType = "nfs";
             options = [ "vers=${toString version}" ];
           }