29 lines
732 B
Nix
29 lines
732 B
Nix
{ pkgs, ... }:
|
|
let
|
|
# this line prevents hanging on network split
|
|
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.mount-timeout=5s,nobrl";
|
|
in
|
|
{
|
|
environment.systemPackages = [ pkgs.cifs-utils ];
|
|
|
|
environment.etc."nixos/smb-secrets" = {
|
|
text = ''
|
|
username=compute
|
|
password=aaShecheseiwee5eeh2p
|
|
'';
|
|
mode = "0400";
|
|
};
|
|
|
|
fileSystems."/data/media" = {
|
|
device = "//fractal/media";
|
|
fsType = "cifs";
|
|
options = [ "uid=1000,${automount_opts},credentials=/etc/nixos/smb-secrets" ];
|
|
};
|
|
|
|
fileSystems."/data/shared" = {
|
|
device = "//fractal/shared";
|
|
fsType = "cifs";
|
|
options = [ "uid=1000,${automount_opts},credentials=/etc/nixos/smb-secrets" ];
|
|
};
|
|
}
|