mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-15 17:45:12 -05:00
42 lines
766 B
Nix
Executable file
42 lines
766 B
Nix
Executable file
{
|
|
pkgs,
|
|
flake,
|
|
...
|
|
}:
|
|
let
|
|
inherit (flake.config.services.instances)
|
|
samba
|
|
jellyfin
|
|
audiobookshelf
|
|
;
|
|
service = samba;
|
|
in
|
|
{
|
|
# If you ever need to start fresh, you need to add yourself to the Samba users database:
|
|
# sudo smbpasswd -a username
|
|
services = {
|
|
samba = {
|
|
package = pkgs.samba4Full;
|
|
enable = true;
|
|
openFirewall = true;
|
|
settings = {
|
|
${service.paths.path1} = {
|
|
path = jellyfin.paths.path0;
|
|
writable = "true";
|
|
};
|
|
${service.paths.path4} = {
|
|
path = audiobookshelf.paths.path0;
|
|
writable = "true";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
networking = {
|
|
firewall = {
|
|
allowedTCPPorts = [
|
|
service.ports.port0
|
|
];
|
|
};
|
|
};
|
|
}
|