temp add samba
This commit is contained in:
44
nas-samba/samba.nix
Normal file
44
nas-samba/samba.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
services.samba-wsdd = {
|
||||
# make shares visible for Windows clients
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
services.samba = {
|
||||
enable = true;
|
||||
securityType = "user";
|
||||
openFirewall = true;
|
||||
extraConfig = ''
|
||||
workgroup = WORKGROUP
|
||||
server string = smbnix
|
||||
netbios name = smbnix
|
||||
security = user
|
||||
#use sendfile = yes
|
||||
#max protocol = smb2
|
||||
# note: localhost is the ipv6 localhost ::1
|
||||
hosts allow = 10.0.1 127.0.0.1 localhost
|
||||
hosts deny = 0.0.0.0/0
|
||||
guest account = nobody
|
||||
map to guest = bad user
|
||||
'';
|
||||
shares = {
|
||||
backup = {
|
||||
path = "/mnt/Main\ Pool/backup";
|
||||
browseable = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "yes";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
};
|
||||
isos = {
|
||||
path = "/mnt/Main\ Pool/isos";
|
||||
browseable = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "yes";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user