Compare commits

..

2 Commits

Author SHA1 Message Date
coolneng 3764e7f4aa
Open Sybase port in the firewall 2021-03-19 11:13:25 +01:00
coolneng 14f9130df8
Set up Samba share 2021-03-19 11:12:57 +01:00
2 changed files with 17 additions and 11 deletions

View File

@ -1,30 +1,34 @@
{ config, lib, pkgs, ... }:
{
# Samba configuration
environment.systemPackages = with pkgs; [ samba ];
services.samba = {
enable = true;
securityType = "share";
nsswins = true;
syncPasswordsByPam = true;
extraConfig = ''
workgroup = WORKGROUP
server string = samba
netbios name = samba
security = ${config.services.samba.securityType}
hosts allow = 10.0.1 localhost
hosts deny = 0.0.0.0/0
server string = unit
netbios name = unit
guest account = nobody
map to guest = bad user
load printers=no
smb encrypt = required
server min protocol = SMB2_10
client min protocol = SMB2
client max protocol = SMB3
ntlm auth = yes
'';
shares.public = {
# FIXME Change path accordingly
sharepath = "/vault/samba";
path = "/vault/samba/CSD";
browseable = "yes";
"read only" = "no";
"guest ok" = "yes";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = "nobody";
"force group" = "nobody";
"force user" = "coace";
"force group" = "users";
};
};
}

View File

@ -38,12 +38,14 @@
allowedTCPPorts = [
445 # Samba
139 # Samba
5000 # Sybase
];
allowedUDPPorts = [
137 # Samba
138 # Samba
1194 # Wireguard
];
allowPing = true;
};
# Enable NAT for wireguard