summary refs log tree commit diff
path: root/nixos/modules/services/network-filesystems
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/network-filesystems')
-rw-r--r--nixos/modules/services/network-filesystems/nfsd.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/modules/services/network-filesystems/nfsd.nix b/nixos/modules/services/network-filesystems/nfsd.nix
index 4fafb7a1fdbb..a0368f1280ae 100644
--- a/nixos/modules/services/network-filesystems/nfsd.nix
+++ b/nixos/modules/services/network-filesystems/nfsd.nix
@@ -130,6 +130,11 @@ in
     systemd.services.nfs-server =
       { enable = true;
         wantedBy = [ "multi-user.target" ];
+
+        preStart =
+          ''
+            mkdir -p /var/lib/nfs/v4recovery
+          '';
       };
 
     systemd.services.nfs-mountd =
@@ -139,6 +144,8 @@ in
 
         preStart =
           ''
+            mkdir -p /var/lib/nfs
+
             ${optionalString cfg.createMountPoints
               ''
                 # create export directories: