76 lines
1.8 KiB
Nix
76 lines
1.8 KiB
Nix
|
{ pkgs, lib, config, ... }:
|
||
|
{
|
||
|
services.netatalk = {
|
||
|
enable = true;
|
||
|
settings = {
|
||
|
Homes = {
|
||
|
"basedir regex" = "/home";
|
||
|
path = "Public";
|
||
|
};
|
||
|
time-machine = {
|
||
|
path = "/mnt/backup/tm_share";
|
||
|
"valid users" = "harald";
|
||
|
"time machine" = true;
|
||
|
};
|
||
|
Qmultimedia = {
|
||
|
path = "/mnt/raid/Qmultimedia";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
services.avahi = {
|
||
|
enable = true;
|
||
|
nssmdns = true;
|
||
|
publish = {
|
||
|
enable = true;
|
||
|
userServices = true;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
services.samba = {
|
||
|
enable = true;
|
||
|
openFirewall = true;
|
||
|
securityType = "user";
|
||
|
extraConfig = ''
|
||
|
read raw = Yes
|
||
|
write raw = Yes
|
||
|
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
|
||
|
min receivefile size = 16384
|
||
|
use sendfile = true
|
||
|
aio read size = 16384
|
||
|
aio write size = 16384
|
||
|
workgroup = WORKGROUP
|
||
|
server string = sgx
|
||
|
netbios name = sgx
|
||
|
security = user
|
||
|
#max protocol = smb2
|
||
|
hosts allow = 192.168.178. 127.0.0.1 localhost 2003::/16 ::1
|
||
|
hosts deny = ALL
|
||
|
guest account = nobody
|
||
|
map to guest = bad user
|
||
|
'';
|
||
|
shares = {
|
||
|
# public = {
|
||
|
# path = "/mnt/Shares/Public";
|
||
|
# browseable = "yes";
|
||
|
# "read only" = "no";
|
||
|
# "guest ok" = "yes";
|
||
|
# "create mask" = "0644";
|
||
|
# "directory mask" = "0755";
|
||
|
# "force user" = "username";
|
||
|
# "force group" = "groupname";
|
||
|
# };
|
||
|
Qmultimedia = {
|
||
|
path = "/mnt/raid/Qmultimedia";
|
||
|
browseable = "yes";
|
||
|
"read only" = "no";
|
||
|
"guest ok" = "no";
|
||
|
"create mask" = "0644";
|
||
|
"directory mask" = "0755";
|
||
|
"force user" = "harald";
|
||
|
"force group" = "users";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|