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
|
config = mkIf cfg.enable {
|
||||||
{
|
fileSystems.${cfg.mountPoint} = {
|
||||||
fileSystems.${cfg.mountPoint} = {
|
device = "${cfg.server}:${cfg.remotePath}";
|
||||||
device = "${cfg.server}:${cfg.remotePath}";
|
fsType = "nfs";
|
||||||
fsType = "nfs";
|
options = [
|
||||||
options = [
|
"defaults"
|
||||||
"defaults"
|
"nofail"
|
||||||
"nofail"
|
"softreval"
|
||||||
"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