unit/modules/datasync.nix

35 lines
785 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";
"read only" = "no";
2021-03-30 09:51:46 +02:00
"guest ok" = "yes";
2021-02-08 13:42:35 +01:00
"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
};
};
}