44 lines
959 B
Nix
44 lines
959 B
Nix
{ config, ... }:
|
|
{
|
|
|
|
# To set password:
|
|
# nix-shell -p samba --run "smbpasswd -a media"
|
|
custom.samba-share.enable = true;
|
|
custom.samba-share.enableWSDD = true;
|
|
custom.samba-share.folders = {
|
|
music = "/media/music";
|
|
audio-books = "/media/audio-books";
|
|
};
|
|
custom.samba-share.private = {
|
|
media = {
|
|
folder = "/media";
|
|
users = "media";
|
|
};
|
|
temp = {
|
|
folder = "/srv/tdarr/transcode_cache";
|
|
users = "media";
|
|
};
|
|
};
|
|
|
|
users.groups."media".gid = config.ids.gids.transmission;
|
|
users.users."media" = {
|
|
uid = config.ids.uids.transmission;
|
|
useDefaultShell = true;
|
|
home = "/home/media";
|
|
createHome = true;
|
|
group = "media";
|
|
};
|
|
|
|
services.permown."/media" = {
|
|
owner = "media";
|
|
group = "media";
|
|
directory-mode = "770";
|
|
file-mode = "770";
|
|
};
|
|
services.permown."/robi" = {
|
|
owner = "media";
|
|
group = "media";
|
|
directory-mode = "770";
|
|
file-mode = "770";
|
|
};
|
|
}
|