{ config, lib, pkgs, ... }: { # Samba configuration environment.systemPackages = with pkgs; [ samba ]; services.samba = { enable = true; nsswins = true; syncPasswordsByPam = true; extraConfig = '' workgroup = WORKGROUP server string = unit netbios name = unit guest account = nobody map to guest = bad user load printers=no smb encrypt = required server min protocol = SMB2_10 client min protocol = SMB2 client max protocol = SMB3 ntlm auth = yes ''; shares.public = { path = "/vault/samba/CSD"; browseable = "yes"; "read only" = "no"; "guest ok" = "yes"; "create mask" = "0644"; "directory mask" = "0755"; "force user" = "coace"; }; }; }