Compare commits
7 Commits
8287465048
...
b97b8ce576
Author | SHA1 | Date |
---|---|---|
Adrian Gunnar Lauterer | b97b8ce576 | |
Adrian Gunnar Lauterer | aa188f5ee7 | |
Adrian Gunnar Lauterer | 7a08654e28 | |
Adrian Gunnar Lauterer | 5ef3c78d4b | |
Adrian Gunnar Lauterer | 4483b84cbe | |
Adrian Gunnar Lauterer | 0e4a5fb0b6 | |
Adrian Gunnar Lauterer | f7bc5bd7b1 |
|
@ -124,8 +124,8 @@
|
|||
services.tailscale.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 22 80 8090 8096 443 433 6969 1194 ];
|
||||
networking.firewall.allowedUDPPorts = [ 22 80 8090 8096 443 433 6969 1194 ];
|
||||
networking.firewall.allowedTCPPorts = [ 22 80 8090 8096 443 433 6969 1194 445 139];
|
||||
networking.firewall.allowedUDPPorts = [ 22 80 8090 8096 443 433 6969 1194 137 138];
|
||||
networking.firewall.enable = true;
|
||||
|
||||
##storage
|
||||
|
|
|
@ -3,20 +3,23 @@
|
|||
|
||||
|
||||
services.samba = {
|
||||
package = pkgs.samba4Full;
|
||||
enable = true;
|
||||
securityType = "user";
|
||||
openFirewall = true;
|
||||
extraConfig = ''
|
||||
workgroup = WORKGROUP
|
||||
server string = smbnix
|
||||
netbios name = smbnix
|
||||
server string = galadriel
|
||||
netbios name = galadriel
|
||||
security = user
|
||||
#use sendfile = yes
|
||||
#max protocol = smb2
|
||||
min protocol = SMB3_00
|
||||
server smb encrypt = required
|
||||
# note: localhost is the ipv6 localhost ::1
|
||||
hosts allow = 192.168.0. 127.0.0.1 localhost 100.0.0.0/8
|
||||
hosts allow = 192.168.1. 127.0.0.1 localhost 100.
|
||||
hosts deny = 0.0.0.0/0
|
||||
guest account = nobody
|
||||
guest account = guest
|
||||
map to guest = bad user
|
||||
'';
|
||||
shares = {
|
||||
|
@ -30,24 +33,16 @@ services.samba = {
|
|||
# "force user" = "username";
|
||||
# "force group" = "groupname";
|
||||
# };
|
||||
Main = {
|
||||
path = "/Main";
|
||||
Backup = {
|
||||
path = "/Main/Backup";
|
||||
"valid users" = "gunalx";
|
||||
"force user" = "gunalx";
|
||||
"force group" = "gunalx";
|
||||
|
||||
public = "no";
|
||||
browseable = "yes";
|
||||
writeable = "yes";
|
||||
|
||||
"fruit:aapl" = "yes";
|
||||
"fruit:time machine" = "yes";
|
||||
"vfs objects" = "catia fruit streams_xattr";
|
||||
|
||||
"read only" = "no";
|
||||
"guest ok" = "no";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
"guest ok" = "yes";
|
||||
"create mask" = "0777";
|
||||
"directory mask" = "0777";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -61,4 +56,38 @@ services.samba-wsdd = {
|
|||
networking.firewall.allowPing = true;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#services.avahi.openfirewall = true;
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns = true;
|
||||
#nssmdns4 = true;
|
||||
publish = {
|
||||
enable = true;
|
||||
addresses = true;
|
||||
domain = true;
|
||||
hinfo = true;
|
||||
userServices = true;
|
||||
workstation = true;
|
||||
};
|
||||
extraServiceFiles = {
|
||||
smb = ''
|
||||
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
|
||||
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
||||
<service-group>
|
||||
<name replace-wildcards="yes">%h</name>
|
||||
<service>
|
||||
<type>_smb._tcp</type>
|
||||
<port>445</port>
|
||||
</service>
|
||||
</service-group>
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue