2022-06-21 12:48:31 +00:00
|
|
|
_: {
|
2022-06-21 12:47:27 +00:00
|
|
|
services.samba-wsdd.enable = true; # make shares visible for windows 10 clients
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
|
|
5357 # wsdd
|
|
|
|
];
|
|
|
|
networking.firewall.allowedUDPPorts = [
|
|
|
|
3702 # wsdd
|
|
|
|
];
|
|
|
|
services.samba = {
|
|
|
|
enable = true;
|
|
|
|
securityType = "user";
|
|
|
|
extraConfig = ''
|
|
|
|
workgroup = WORKGROUP
|
|
|
|
server string = nas
|
|
|
|
netbios name = nas
|
2022-06-21 12:48:31 +00:00
|
|
|
security = user
|
2022-06-21 12:47:27 +00:00
|
|
|
#use sendfile = yes
|
|
|
|
#max protocol = smb2
|
|
|
|
# note: localhost is the ipv6 localhost ::1
|
|
|
|
hosts allow = 192.168.2. 127.0.0.1 localhost
|
|
|
|
hosts deny = 0.0.0.0/0
|
|
|
|
guest account = nobody
|
|
|
|
map to guest = bad user
|
|
|
|
'';
|
|
|
|
shares = {
|
|
|
|
winstall = {
|
|
|
|
path = "/mnt/win";
|
|
|
|
browseable = "yes";
|
2022-06-21 12:50:25 +00:00
|
|
|
"read only" = "yes";
|
2022-06-21 12:47:27 +00:00
|
|
|
"guest ok" = "yes";
|
|
|
|
"create mask" = "0644";
|
|
|
|
"directory mask" = "0755";
|
|
|
|
"force user" = "nobody";
|
|
|
|
"force group" = "users";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
openFirewall = true;
|
2022-06-21 12:48:31 +00:00
|
|
|
};
|
|
|
|
}
|