storage-ng: enable samba

This commit is contained in:
Astro 2022-03-10 16:25:17 +01:00
parent c83239f251
commit 2a0b099ce9
1 changed files with 28 additions and 8 deletions

View File

@ -82,14 +82,34 @@ in
root = "/mnt/cephfs/c3d2/tftp";
};
/* # Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
23
];
networking.firewall.allowedUDPPorts = [
69
];
*/
services.samba = {
enable = true;
enableNmbd = true;
extraConfig = ''
workgroup = HQ
server string = storage
netbios name = storage
hosts allow = 172.20.0.0/14 127.0.0.0/8 ::1/128 fe80::/64 fd23:42:c3d2:500::/56 2a00:8180:2c00:200::/56
hosts deny = 0.0.0.0/0
security = user
guest account = nobody
map to guest = bad user
smb encrypt = required
ntlm auth = yes
passdb backend = smbpasswd
'';
shares = {
c3d2 = {
path = "/mnt/cephfs/c3d2";
browseable = "yes";
writable = "yes";
"valid users" = "k-ot";
"guest ok" = "no";
"create mode" = "0666";
"directory mode" = "0777";
};
};
};
networking.firewall.enable = false;