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

28 lines
640 B
Nix

{ config, ... }:
{
services = {
samba = {
enable = config.system.server.enable;
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";
};
};
};
# Advertise to Windows
samba-wsdd = {
enable = config.system.server.enable;
openFirewall = true;
};
};
}