52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
{ config, ... }:
|
|
{
|
|
|
|
healthchecks.closed.retiolum.ports.share = [
|
|
137
|
|
138
|
|
139
|
|
445
|
|
];
|
|
networking.firewall.interfaces.enp0s31f6.allowedTCPPorts = [
|
|
445
|
|
139
|
|
];
|
|
networking.firewall.interfaces.enp0s31f6.allowedUDPPorts = [
|
|
137
|
|
138
|
|
];
|
|
|
|
# To set password:
|
|
# nix-shell -p samba --run "smbpasswd -a media"
|
|
samba-share.enable = false;
|
|
samba-share.folders = {
|
|
music = "/media/music";
|
|
audio-books = "/media/audio-books";
|
|
movies = "/media/movies";
|
|
series = "/media/series";
|
|
samples = "/media/samples";
|
|
};
|
|
|
|
users.users.mainUser.extraGroups = [ "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";
|
|
};
|
|
}
|