chore(jeeves)!: update samba config

Now (as of last `nix flake update`) using more structured `Nix`
This commit is contained in:
reo101 2024-09-15 15:43:09 +03:00
parent 93717bf1a9
commit 2b8287dca8
Signed by: reo101
GPG key ID: 675AA7EF13964ACB

View file

@ -15,33 +15,35 @@
enable = true; enable = true;
package = pkgs.sambaFull; package = pkgs.sambaFull;
openFirewall = true; openFirewall = true;
securityType = "user"; settings = {
extraConfig = '' global = {
# Files # Files
workgroup = WORKGROUP "workgroup" = "WORKGROUP";
server string = Jeeves "server string" = "Jeeves";
netbios name = jeeves "netbios name" = "jeeves";
security = user "security" = "user";
#use sendfile = yes # "use sendfile" = "yes";
#max protocol = smb2 # "max protocol" = "smb2";
# NOTE: localhost is the ipv6 localhost ::1 # NOTE: localhost is the ipv6 localhost ::1
hosts allow = 192.168.0. 192.168.1. 10.100.0. 127.0.0.1 localhost # TODO: keep glogal network metadata somehow
hosts deny = 0.0.0.0/0 "hosts allow" = "192.168.0. 192.168.1. 10.100.0. 127.0.0.1 localhost";
guest account = nobody "hosts deny" = "0.0.0.0/0";
map to guest = bad user "guest account" = "nobody";
"map to guest" = "bad user";
# Symlinks # Symlinks;
allow insecure wide links = yes "allow insecure wide links" = "yes";
# Printers # Printers;
load printers = yes "load printers" = "yes";
printing = cups "printing" = "cups";
printcap name = cups "printcap name" = "cups";
''; };
shares = {
# Shares
public = { public = {
path = "/data/samba/public"; "path" = "/data/samba/public";
browseable = "yes"; "browseable" = "yes";
"read only" = "no"; "read only" = "no";
"guest ok" = "yes"; "guest ok" = "yes";
"create mask" = "0644"; "create mask" = "0644";
@ -50,8 +52,8 @@
"force group" = "users"; "force group" = "users";
}; };
private = { private = {
path = "/data/samba/private"; "path" = "/data/samba/private";
browseable = "yes"; "browseable" = "yes";
"read only" = "no"; "read only" = "no";
"guest ok" = "no"; "guest ok" = "no";
"create mask" = "0644"; "create mask" = "0644";