unit/modules/datasync.nix

31 lines
733 B
Nix

{ config, lib, pkgs, ... }:
{
services.samba = {
enable = true;
securityType = "share";
nsswins = true;
extraConfig = ''
workgroup = WORKGROUP
server string = samba
netbios name = samba
security = ${config.services.samba.securityType}
hosts allow = 192.168.1 localhost
hosts deny = 0.0.0.0/0
guest account = nobody
map to guest = bad user
'';
shares.public = {
# FIXME Change path accordingly
sharepath = "/mnt/Shares/Public";
browseable = "yes";
"read only" = "no";
"guest ok" = "yes";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = "nobody";
"force group" = "nobody";
};
};
}