refactor
This commit is contained in:
parent
1206380efd
commit
7203fc1ed9
51 changed files with 175 additions and 108 deletions
49
nixos/viridian/services/samba/default.nix
Normal file
49
nixos/viridian/services/samba/default.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{...}: {
|
||||
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 = 192.168.50.237 192.168.50.12 127.0.0.1 localhost
|
||||
hosts deny = 0.0.0.0/0
|
||||
guest account = nobody
|
||||
map to guest = bad user
|
||||
'';
|
||||
shares = {
|
||||
spectre = {
|
||||
path = "/srv/shares/spectre";
|
||||
browseable = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "no";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
"force user" = "spectre";
|
||||
"force group" = "users";
|
||||
};
|
||||
sajenim = {
|
||||
path = "/srv/shares/sajenim";
|
||||
browseable = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "no";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
"force user" = "sajenim";
|
||||
"force group" = "users";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.samba-wsdd = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
environment.persistence."/persist".directories = ["/var/lib/samba"];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue