unit/modules/datasync.nix

35 lines
784 B
Nix
Raw Normal View History

2021-02-08 13:42:35 +01:00
{ config, lib, pkgs, ... }:
{
2021-03-19 11:12:57 +01:00
# Samba configuration
environment.systemPackages = with pkgs; [ samba ];
2021-02-08 13:42:35 +01:00
services.samba = {
enable = true;
nsswins = true;
2021-03-19 11:12:57 +01:00
syncPasswordsByPam = true;
2021-02-08 13:42:35 +01:00
extraConfig = ''
workgroup = WORKGROUP
2021-03-19 11:12:57 +01:00
server string = unit
netbios name = unit
2021-02-08 13:42:35 +01:00
guest account = nobody
map to guest = bad user
2021-03-19 11:12:57 +01:00
load printers=no
smb encrypt = required
server min protocol = SMB2_10
client min protocol = SMB2
client max protocol = SMB3
ntlm auth = yes
2021-02-08 13:42:35 +01:00
'';
shares.public = {
2021-03-19 11:12:57 +01:00
path = "/vault/samba/CSD";
2021-02-08 13:42:35 +01:00
browseable = "yes";
2021-03-23 13:15:25 +01:00
writeable = "yes";
2021-02-08 13:42:35 +01:00
"read only" = "no";
"create mask" = "0644";
"directory mask" = "0755";
2021-03-19 11:12:57 +01:00
"force user" = "coace";
2021-02-08 13:42:35 +01:00
};
};
}