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.
This commit is contained in:
@@ -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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user