From 90df912f1a171dbf388a0c1821f30da08bef54fb Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Sun, 26 Oct 2025 22:19:27 -0500 Subject: [PATCH] Fix auto-mounting NFS Since my NFS mounts are connecting across tailscale, we need to force them to wait for the tailscaled to be connected already --- hosts/vm-jellyfin/default.nix | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/hosts/vm-jellyfin/default.nix b/hosts/vm-jellyfin/default.nix index 4c64d7e..0696e93 100644 --- a/hosts/vm-jellyfin/default.nix +++ b/hosts/vm-jellyfin/default.nix @@ -27,27 +27,27 @@ glxinfo jellyfin-ffmpeg libva-utils + nfs-utils radeontop vulkan-tools ]; - fileSystems = { - "/music" = { - device = "nas1.shire-zebra.ts.net:/mnt/all/music"; - fsType = "nfs"; - options = [ "ro" ]; + systemd.mounts = let + nfs = name: { + what = "nas1.shire-zebra.ts.net:/mnt/all/${name}"; + type = "nfs"; + name = "${name}.mount"; + where = "/${name}"; + requires = [ "tailscaled-autoconnect.service" ]; + after = [ "tailscaled-autoconnect.service" ]; + wantedBy = [ "multi-user.target" ]; + mountConfig.Options = "_netdev,noexec,ro,timeo=50,retrans=5,soft"; }; - "/photo" = { - device = "nas1.shire-zebra.ts.net:/mnt/all/photos"; - fsType = "nfs"; - options = [ "ro" ]; - }; - "/video" = { - device = "nas1.shire-zebra.ts.net:/mnt/all/video/"; - fsType = "nfs"; - options = [ "ro" ]; - }; - }; + in [ + (nfs "music") + (nfs "photos") + (nfs "video") + ]; hardware = { enableAllFirmware = true;