mount nas shares on demand
This commit is contained in:
@@ -53,6 +53,22 @@
|
||||
"x-systemd.device-timeout=10"
|
||||
];
|
||||
};
|
||||
|
||||
# Pin the NFS server until nas.hfx.ahmza.com points at 10.10.100.4.
|
||||
# Automounting keeps an unavailable NAS out of the boot path.
|
||||
nfsShare = export: {
|
||||
device = "10.10.100.4:${export}";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"nfsvers=4.2"
|
||||
"noauto"
|
||||
"nofail"
|
||||
"_netdev"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.idle-timeout=600"
|
||||
"x-systemd.mount-timeout=10"
|
||||
];
|
||||
};
|
||||
in {
|
||||
fileSystems = {
|
||||
# Boot essentials, by UUID. UUIDs rather than labels here on purpose:
|
||||
@@ -72,6 +88,8 @@
|
||||
"/mnt/dump" = spinningDrive "DUMP";
|
||||
"/mnt/bak" = spinningDrive "BAK";
|
||||
"/mnt/games" = eagerDrive "GAMES";
|
||||
"/mnt/nas" = nfsShare "/srv/nas";
|
||||
"/mnt/media" = nfsShare "/srv/media";
|
||||
};
|
||||
|
||||
# Swap exists for hibernation, not for memory pressure — 31GiB of RAM on a
|
||||
|
||||
Reference in New Issue
Block a user