38 lines
737 B
Nix
38 lines
737 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
services.samba = {
|
|
enable = true;
|
|
securityType = "user";
|
|
extraConfig = ''
|
|
workgroup = WORKGROUP
|
|
server string = smbnix
|
|
netbios name = smbnix
|
|
security = user
|
|
#use sendfile = yes
|
|
#max protocol = smb2
|
|
min protocol = NT1
|
|
hosts allow = 192.168.0 localhost
|
|
hosts deny = 0.0.0.0/0
|
|
guest account = nobody
|
|
map to guest = bad user
|
|
'';
|
|
shares = {
|
|
public = {
|
|
path = "/mnt/ps2";
|
|
browseable = "yes";
|
|
"read only" = "no";
|
|
"guest ok" = "yes";
|
|
"public" = "yes";
|
|
"available" = "yes";
|
|
"create mask" = "0644";
|
|
"directory mask" = "0755";
|
|
"force user" = "username";
|
|
"force group" = "groupname";
|
|
};
|
|
};
|
|
};
|
|
|
|
}
|