NixOS-Config/modules/system/services/fileserver/local/samba/default.nix

37 lines
847 B
Nix
Raw Normal View History

2024-10-09 03:36:08 -04:00
{ outputs, ... }:
{
2024-09-11 00:59:16 -04:00
services = {
samba = {
enable = true;
securityType = "user";
openFirewall = true;
extraConfig = ''
2024-09-11 00:59:16 -04:00
workgroup = WORKGROUP
server string = JimSMB
security = user
hosts allow = ${outputs.ips.localSpan}. 127.0.0.1 localhost
2024-09-11 00:59:16 -04:00
hosts deny = 0.0.0.0/0
guest account = nobody
map to guest = bad user
'';
shares = {
roms = {
comment = "Samba share with my ROMs";
path = "/export/JimboNFS/Downloads/GameFiles/ROMS";
browseable = "yes";
"read only" = "no";
"guest ok" = "no";
"create mask" = "0644";
"directory mask" = "0755";
};
};
};
# Advertise to Windows
samba-wsdd = {
enable = true;
openFirewall = true;
};
};
}