nixos-config/modules/system/services/server/fileserver/samba/default.nix

28 lines
636 B
Nix
Raw Normal View History

2024-12-22 22:02:10 -05:00
{ config, lib, ... }:
2024-10-09 03:36:08 -04:00
{
2024-12-22 22:02:10 -05:00
services = lib.mkIf config.system.server.enable {
2024-09-11 00:59:16 -04:00
samba = {
2024-12-22 22:02:10 -05:00
enable = true;
2024-09-11 00:59:16 -04:00
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";
};
2024-09-11 00:59:16 -04:00
};
};
# Advertise to Windows
samba-wsdd = {
2024-12-22 22:02:10 -05:00
enable = true;
2024-09-11 00:59:16 -04:00
openFirewall = true;
};
};
}