Make sure DNS is up before mounting NFS.

This commit is contained in:
2025-10-24 22:49:32 +01:00
parent a7dce7cfb9
commit a57fc9107b
4 changed files with 66 additions and 0 deletions

View File

@@ -9,12 +9,17 @@
# The mount is established at boot time and persists - no auto-unmount.
# This prevents issues with Docker bind mounts seeing empty automount stubs.
imports = [
./wait-for-dns-ready.nix
];
fileSystems."/data/services" = {
device = "data-services.service.consul:/persist/services";
fsType = "nfs";
options = [
"nofail" # Don't block boot if mount fails
"x-systemd.mount-timeout=30s" # Timeout for mount attempts
"x-systemd.after=wait-for-dns-ready.service" # Wait for DNS to actually work
"_netdev" # Network filesystem (wait for network)
];
};