nixos-configs/machine/backyard/samba.nix

64 lines
1.5 KiB
Nix
Raw Normal View History

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;
2024-12-02 00:04:31 +00:00
settings = let
2024-04-16 02:28:04 +00:00
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}";
2024-12-02 00:04:31 +00:00
"security" = "user";
2024-04-16 02:28:04 +00:00
};
in {
2024-12-02 00:04:31 +00:00
global = {
"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";
"unix extensions" = "yes";
"ntlm auth" = "yes";
};
2024-04-16 02:28:04 +00:00
tvb = homeShare "tvb";
};
};
}