diff --git a/common/cifs-client.nix b/common/cifs-client.nix index acd187d..f75112b 100644 --- a/common/cifs-client.nix +++ b/common/cifs-client.nix @@ -1,4 +1,8 @@ { pkgs, ... }: +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 { environment.systemPackages = [ pkgs.cifs-utils ]; @@ -14,10 +18,6 @@ device = "//fractal/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-secrets" ]; }; @@ -25,10 +25,6 @@ device = "//fractal/shared"; 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-secrets" ]; }; }