server7: move samba from storage to samba container
This commit is contained in:
parent
3f1934c2b3
commit
e1ed8caa85
|
@ -2,8 +2,8 @@ name:
|
|||
|
||||
(import ../outer-defaults.nix name) // {
|
||||
|
||||
bindMounts."/srv/c3d2" = {
|
||||
hostPath = "/srv/ceph/c3d2";
|
||||
bindMounts."/srv/files" = {
|
||||
hostPath = "/srv/ceph/c3d2/files";
|
||||
isReadOnly = true;
|
||||
};
|
||||
|
||||
|
@ -16,21 +16,20 @@ name:
|
|||
enable = true;
|
||||
enableNmbd = true;
|
||||
extraConfig = ''
|
||||
workgroup = WORKGROUP
|
||||
workgroup = HQ
|
||||
server string = storage
|
||||
netbios name = storage
|
||||
hosts allow = 172.20 172.22 172.22.99.146
|
||||
hosts allow = 172.20.0.0/14 127.0.0.0/8
|
||||
hosts deny = 0.0.0.0/0
|
||||
guest account = k-ot
|
||||
map to guest = Bad user
|
||||
'';
|
||||
shares = {
|
||||
c3d2 = {
|
||||
path = "/srv/c3d2";
|
||||
path = "/srv/files";
|
||||
browseable = "yes";
|
||||
"read only" = "no";
|
||||
"read only" = "yes";
|
||||
"guest ok" = "yes";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -52,30 +52,6 @@ name:
|
|||
};
|
||||
};
|
||||
|
||||
services.samba = {
|
||||
enable = true;
|
||||
securityType = "user";
|
||||
extraConfig = ''
|
||||
workgroup = HQ
|
||||
server string = storage
|
||||
netbios name = storage
|
||||
security = share
|
||||
hosts allow = 0.0.0.0/0
|
||||
guest account = k-ot
|
||||
map to guest = bad user
|
||||
'';
|
||||
shares = {
|
||||
files = {
|
||||
path = "/srv/c3d2/files";
|
||||
browseable = "yes";
|
||||
"read only" = "yes";
|
||||
"guest ok" = "yes";
|
||||
"force user" = "k-ot";
|
||||
"force group" = "users";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.enable = false;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue