Factor out some options.
This commit is contained in:
@@ -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" ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user