Samba: Difference between revisions
imported>Mic92 No edit summary |
imported>Sjau changeing server stuff.... adding seperate shares |
||
| Line 32: | Line 32: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
services.samba | services.samba = { | ||
enable = true; | |||
securityType = "share"; | |||
extraConfig = '' | |||
workgroup = WORKGROUP | |||
server string = smbnix | |||
netbios name = smbnix | |||
security = share | |||
#use sendfile = yes | |||
#max protocol = smb2 | |||
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/Shares/Public"; | |||
browseable = "yes"; | |||
"read only" = "no"; | |||
"guest ok" = "yes"; | |||
"create mask" = "0644"; | |||
"directory mask" = "0755"; | |||
"force user" = "username"; | |||
"force group" = "groupname"; | |||
}; | |||
private = { | |||
path = "/mnt/Shares/Private"; | |||
browseable = "yes"; | |||
"read only" = "no"; | |||
"guest ok" = "no"; | |||
"create mask" = "0644"; | |||
"directory mask" = "0755"; | |||
"force user" = "username"; | |||
"force group" = "groupname"; | |||
}; | |||
}; | |||
}; | |||
</syntaxhighlight> | </syntaxhighlight> | ||