forked from jan-leila/nix-config
76 lines
2.1 KiB
Nix
76 lines
2.1 KiB
Nix
{...}: {
|
|
boot.supportedFilesystems = ["nfs"];
|
|
|
|
fileSystems = {
|
|
"/mnt/leyla_documents" = {
|
|
device = "defiant:/exports/leyla_documents";
|
|
fsType = "nfs";
|
|
options = [
|
|
"x-systemd.automount"
|
|
"noauto"
|
|
"noatime"
|
|
"nofail"
|
|
"soft"
|
|
"intr" # Allow interruption of NFS calls
|
|
"timeo=30" # 3 second timeout (30 deciseconds)
|
|
"retrans=2" # Only 2 retries before giving up
|
|
"x-systemd.idle-timeout=300" # 5 minute idle timeout for mobile
|
|
"x-systemd.device-timeout=15" # 15 second device timeout
|
|
"bg" # Background mount - don't block boot
|
|
"fsc" # Enable caching
|
|
"_netdev" # Network device - wait for network
|
|
"x-systemd.requires=network-online.target" # Require network to be online
|
|
"x-systemd.after=network-online.target" # Start after network is online
|
|
"x-systemd.mount-timeout=30" # 30 second mount timeout
|
|
];
|
|
};
|
|
|
|
"/mnt/users_documents" = {
|
|
device = "defiant:/exports/users_documents";
|
|
fsType = "nfs";
|
|
options = [
|
|
"x-systemd.automount"
|
|
"noauto"
|
|
"nofail"
|
|
"soft"
|
|
"intr"
|
|
"timeo=30"
|
|
"retrans=2"
|
|
"x-systemd.idle-timeout=300"
|
|
"x-systemd.device-timeout=15"
|
|
"bg"
|
|
"fsc"
|
|
"_netdev"
|
|
"x-systemd.requires=network-online.target"
|
|
"x-systemd.after=network-online.target"
|
|
"x-systemd.mount-timeout=30"
|
|
];
|
|
};
|
|
|
|
"/mnt/media" = {
|
|
device = "defiant:/exports/media";
|
|
fsType = "nfs";
|
|
options = [
|
|
"x-systemd.automount"
|
|
"noauto"
|
|
"noatime"
|
|
"nofail"
|
|
"soft"
|
|
"intr"
|
|
"timeo=30"
|
|
"retrans=2"
|
|
"x-systemd.idle-timeout=300"
|
|
"x-systemd.device-timeout=15"
|
|
"bg"
|
|
# Mobile-optimized read settings
|
|
"rsize=8192" # Smaller read size for mobile
|
|
"wsize=8192" # Smaller write size for mobile
|
|
"fsc"
|
|
"_netdev"
|
|
"x-systemd.requires=network-online.target"
|
|
"x-systemd.after=network-online.target"
|
|
"x-systemd.mount-timeout=30"
|
|
];
|
|
};
|
|
};
|
|
}
|