From cdffc31be814e0f768d2663b1e2eefca328bd2a1 Mon Sep 17 00:00:00 2001 From: Alex Ottr Date: Wed, 30 Oct 2024 02:02:59 +0100 Subject: [PATCH] add smb share --- nixos/ferret/media.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nixos/ferret/media.nix b/nixos/ferret/media.nix index 470621e..babba0d 100644 --- a/nixos/ferret/media.nix +++ b/nixos/ferret/media.nix @@ -11,6 +11,17 @@ in { uid = 976; }; + environment.systemPackages = [ pkgs.cifs-utils ]; + fileSystems."/storage" = { + device = "//pine.otter.place/media"; + fsType = "cifs"; + options = let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; + + in ["${automount_opts},credentials=/etc/nixos/smb-media,uid=976,gid=976"]; + }; + services.jellyfin = { enable = true; -- 2.51.2