Compare commits
No commits in common. "3764e7f4aa49eb02c989311c508786caeddea44d" and "d3c201d200518ee04f40e612a7217f0574315df4" have entirely different histories.
3764e7f4aa
...
d3c201d200
|
@ -1,34 +1,30 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Samba configuration
|
|
||||||
environment.systemPackages = with pkgs; [ samba ];
|
|
||||||
|
|
||||||
services.samba = {
|
services.samba = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
securityType = "share";
|
||||||
nsswins = true;
|
nsswins = true;
|
||||||
syncPasswordsByPam = true;
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
workgroup = WORKGROUP
|
workgroup = WORKGROUP
|
||||||
server string = unit
|
server string = samba
|
||||||
netbios name = unit
|
netbios name = samba
|
||||||
|
security = ${config.services.samba.securityType}
|
||||||
|
hosts allow = 10.0.1 localhost
|
||||||
|
hosts deny = 0.0.0.0/0
|
||||||
guest account = nobody
|
guest account = nobody
|
||||||
map to guest = bad user
|
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 = {
|
shares.public = {
|
||||||
path = "/vault/samba/CSD";
|
# FIXME Change path accordingly
|
||||||
|
sharepath = "/vault/samba";
|
||||||
browseable = "yes";
|
browseable = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
|
"guest ok" = "yes";
|
||||||
"create mask" = "0644";
|
"create mask" = "0644";
|
||||||
"directory mask" = "0755";
|
"directory mask" = "0755";
|
||||||
"force user" = "coace";
|
"force user" = "nobody";
|
||||||
"force group" = "users";
|
"force group" = "nobody";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,14 +38,12 @@
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
445 # Samba
|
445 # Samba
|
||||||
139 # Samba
|
139 # Samba
|
||||||
5000 # Sybase
|
|
||||||
];
|
];
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
137 # Samba
|
137 # Samba
|
||||||
138 # Samba
|
138 # Samba
|
||||||
1194 # Wireguard
|
1194 # Wireguard
|
||||||
];
|
];
|
||||||
allowPing = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable NAT for wireguard
|
# Enable NAT for wireguard
|
||||||
|
|
Loading…
Reference in New Issue