modules/samba.nix (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
{ config, lib, pkgs, ... }:
{
# For mount.cifs, required unless domain name resolution is not needed.
environment.systemPackages = [ pkgs.cifs-utils ];
fileSystems."/media/roboag" = {
device = "//192.168.2.20/roboag";
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/modules/smb-secrets,uid=1000,gid=100"];
};
}
|