From 1ecc3302b182becd7f2cc2b30cdd92723e100547 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Mon, 11 May 2026 18:10:11 -0700 Subject: [PATCH] fix(nfs-mounts): add network and systemd mount options Add _netdev, x-systemd.requires/after network-online.target, x-systemd.automatic-mount=force, and x-systemd.mount-timeout=90 to improve NFS mount reliability on boot and network changes. --- roles/nfs-mounts/default.nix | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/roles/nfs-mounts/default.nix b/roles/nfs-mounts/default.nix index 67be937..b3314b9 100644 --- a/roles/nfs-mounts/default.nix +++ b/roles/nfs-mounts/default.nix @@ -31,16 +31,20 @@ in }; }; - config = mkIf cfg.enable - { - fileSystems.${cfg.mountPoint} = { - device = "${cfg.server}:${cfg.remotePath}"; - fsType = "nfs"; - options = [ - "defaults" - "nofail" - "softreval" - ]; - }; + config = mkIf cfg.enable { + fileSystems.${cfg.mountPoint} = { + device = "${cfg.server}:${cfg.remotePath}"; + fsType = "nfs"; + options = [ + "defaults" + "nofail" + "softreval" + "_netdev" + "x-systemd.requires=network-online.target" + "x-systemd.after=network-online.target" + "x-systemd.automatic-mount=force" + "x-systemd.mount-timeout=90" + ]; }; + }; }