Factor out some options.

This commit is contained in:
2024-09-24 15:34:34 +01:00
parent 7493390e98
commit 1470fb7b98

View File

@@ -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" ];
};
}