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

38 lines
927 B
Nix
Raw Normal View History

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