Factor out some options.
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
{ pkgs, ... }:
|
{ 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 ];
|
environment.systemPackages = [ pkgs.cifs-utils ];
|
||||||
|
|
||||||
@@ -14,10 +18,6 @@
|
|||||||
device = "//fractal/media";
|
device = "//fractal/media";
|
||||||
fsType = "cifs";
|
fsType = "cifs";
|
||||||
options =
|
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" ];
|
[ "${automount_opts},credentials=/etc/nixos/smb-secrets" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -25,10 +25,6 @@
|
|||||||
device = "//fractal/shared";
|
device = "//fractal/shared";
|
||||||
fsType = "cifs";
|
fsType = "cifs";
|
||||||
options =
|
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" ];
|
[ "${automount_opts},credentials=/etc/nixos/smb-secrets" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user