Fix SMB service
This commit is contained in:
parent
98891a9b15
commit
1fa3e16a8c
4 changed files with 15 additions and 11 deletions
|
@ -1,14 +1,18 @@
|
|||
{ config, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
age.secrets.smb-secrets = {
|
||||
rekeyFile = ./smb-secrets.age;
|
||||
};
|
||||
|
||||
# For mount.cifs, required unless domain name resolution is not needed.
|
||||
environment.systemPackages = [ pkgs.cifs-utils ];
|
||||
|
||||
fileSystems."/home/sajenim/.backup" = {
|
||||
device = "//192.168.1.102/sajenim";
|
||||
device = "//192.168.20.4/sajenim";
|
||||
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,user,users";
|
||||
|
||||
in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue