2024-04-16 02:28:04 +00:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
{
|
|
|
|
# This is mostly to get smbpasswd
|
|
|
|
environment.systemPackages = [ pkgs.samba ];
|
|
|
|
|
|
|
|
services.samba-wsdd = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.samba = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
securityType = "user";
|
|
|
|
extraConfig = ''
|
|
|
|
workgroup = beatific
|
|
|
|
server string = backyard smb server
|
|
|
|
netbios name = backyard
|
|
|
|
deadtime = 300
|
|
|
|
|
|
|
|
local master = yes
|
|
|
|
domain master = yes
|
|
|
|
preferred master = yes
|
|
|
|
|
|
|
|
guest account = nobody
|
|
|
|
map to guest = bad user
|
|
|
|
|
|
|
|
case sensitive = yes
|
|
|
|
veto files = /^.DS_Store$/^.Trash-1000$/
|
|
|
|
|
|
|
|
load printers = no
|
|
|
|
printcap name = /dev/null
|
|
|
|
printing = bsd
|
|
|
|
|
|
|
|
log file = /var/log/samba/client-%m.log
|
|
|
|
log level = 2
|
|
|
|
max log size = 64
|
|
|
|
|
|
|
|
hide dot files = no
|
|
|
|
hosts allow = 10.22.20., 192.168.1.
|
|
|
|
map archive = no
|
2024-11-19 06:57:43 +00:00
|
|
|
unix extensions = yes
|
2024-04-16 02:28:04 +00:00
|
|
|
|
|
|
|
ntlm auth = yes
|
|
|
|
'';
|
|
|
|
shares = let
|
|
|
|
homeShare = user: {
|
|
|
|
path = "/home/${user}";
|
|
|
|
comment = "${user}'s home folder";
|
|
|
|
browseable = "yes";
|
|
|
|
"read only" = "no";
|
|
|
|
"guest okay" = "no";
|
|
|
|
"create mask" = "0640";
|
|
|
|
"force create mode" = "0640";
|
|
|
|
"directory mask" = "0750";
|
|
|
|
"force directory mode" = "0750";
|
|
|
|
"valid users" = "${user}";
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
tvb = homeShare "tvb";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|