fix samba config

works!
This commit is contained in:
Motiejus Jakštys 2023-09-12 22:55:17 +03:00
parent 4f45d605e1
commit e45573c8a6
1 changed files with 7 additions and 6 deletions

View File

@ -16,25 +16,26 @@
config = with config.mj.services.jakstpub; config = with config.mj.services.jakstpub;
lib.mkIf enable { lib.mkIf enable {
services.samba = { services.samba = {
# https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server
enable = true; enable = true;
securityType = "user"; securityType = "user";
enableNmbd = true; enableNmbd = true;
enableWinbindd = true; enableWinbindd = true;
extraConfig = '' extraConfig = ''
workgroup = WORKGROUP
netbios name = HOMESERV
map to guest = Bad User map to guest = Bad User
log level = 1
guest account = jakstpub
server role = standalone server
''; '';
shares = { shares = {
public = { public = {
path = dataDir; path = dataDir;
writable = "yes"; writeable = "yes";
printable = "no";
public = "yes"; public = "yes";
"guest ok" = "yes"; "guest ok" = "yes";
"read only" = "no"; "read only" = "no";
"create mask" = 666; "create mask" = "0666";
"directory mask" = 777; "directory mask" = "0777";
"force user" = "jakstpub"; "force user" = "jakstpub";
"force group" = "jakstpub"; "force group" = "jakstpub";
}; };