feat: switch to samba for media share

This commit is contained in:
Felix Schröter 2022-02-04 23:23:34 +01:00
parent a9e41abe2f
commit dfe6dbecf3
Signed by: felschr
GPG key ID: 671E39E6744C807D
7 changed files with 50 additions and 14 deletions

28
services/samba/rpi4.nix Normal file
View file

@ -0,0 +1,28 @@
{ config, pkgs, ... }:
{
# Use `smbpasswd -a <user>` to set passwords
services.samba = {
enable = true;
openFirewall = true;
securityType = "user";
extraConfig = ''
guest account = nobody
map to guest = bad user
use sendfile = true
'';
shares = {
media = {
path = "/media";
public = "no";
browseable = "yes";
writeable = "yes";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = "felschr";
"force group" = "users";
};
};
};
}