refactor: abstract NFS mount creation via custom options
This commit is contained in:
parent
d4d655e735
commit
1403b1f9c0
9 changed files with 93 additions and 120 deletions
|
|
@ -25,17 +25,14 @@ in {
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
fileSystems."${cfg.hostPath}" = {
|
||||
homelab.nfsMounts."${cfg.hostPath}" = {
|
||||
device = "192.168.0.11:${remotePath}";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
permissionsOption
|
||||
readOnly = permissionsOption == "ro";
|
||||
extraOptions = [
|
||||
"auto"
|
||||
"nfsvers=4.2"
|
||||
"async" "soft"
|
||||
"rsize=1048576" "wsize=1048576"
|
||||
"timeo=600" "retry=50" "retrans=2" "actimeo=1800" "lookupcache=all"
|
||||
"_netdev" "nosuid" "tcp"
|
||||
"timeo=600" "retrans=2"
|
||||
"_netdev"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue