Port Samba to NixOS 24.11
This commit is contained in:
parent
6ed0c4561c
commit
b54924fec6
1 changed files with 22 additions and 31 deletions
|
@ -1,29 +1,31 @@
|
|||
{
|
||||
services.samba = {
|
||||
enable = true;
|
||||
securityType = "user";
|
||||
openFirewall = true;
|
||||
extraConfig = ''
|
||||
workgroup = WORKGROUP
|
||||
server string = franz
|
||||
netbios name = franz
|
||||
security = user
|
||||
#use sendfile = yes
|
||||
#max protocol = smb2
|
||||
# note: localhost is the ipv6 localhost ::1
|
||||
hosts allow = 192.168.178. 127.0.0.1 localhost
|
||||
hosts deny = 0.0.0.0/0
|
||||
guest account = nobody
|
||||
map to guest = bad user
|
||||
settings = {
|
||||
global = {
|
||||
"invalid users" = [
|
||||
"root"
|
||||
];
|
||||
"passwd program" = "/run/wrappers/bin/passwd %u";
|
||||
"security" = "user";
|
||||
|
||||
# debugging
|
||||
# log file = /var/log/samba/log.%m
|
||||
# max log size = 1000
|
||||
# logging = file
|
||||
'';
|
||||
"workgroup" = "WORKGROUP";
|
||||
"server string" = "franz";
|
||||
"netbios name" = "franz";
|
||||
# note: localhost is the ipv6 localhost ::1
|
||||
"hosts allow" = "192.168.178. 127.0.0.1 localhost";
|
||||
"hosts deny" = "0.0.0.0/0";
|
||||
"guest account" = "nobody";
|
||||
"map to guest" = "bad user";
|
||||
|
||||
# Run sudo smbpasswd -a <username> to set the smb password for an EXISTING linux user
|
||||
shares = {
|
||||
# debugging
|
||||
# log file = /var/log/samba/log.%m
|
||||
# max log size = 1000
|
||||
# logging = file
|
||||
};
|
||||
|
||||
# Run sudo smbpasswd -a <username> to set the smb password for an EXISTING linux user
|
||||
software = {
|
||||
path = "/storage/dataset/data/torrents/misc";
|
||||
browseable = "yes";
|
||||
|
@ -34,17 +36,6 @@
|
|||
"force user" = "ghoscht";
|
||||
"force group" = "users";
|
||||
};
|
||||
max = {
|
||||
path = "/storage/dataset/nas/max";
|
||||
browseable = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "no";
|
||||
"valid users" = "max";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
"force user" = "ghoscht";
|
||||
"force group" = "users";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue