- sabnzbd, prowlarr, sonarr, radarr, clonarr, seerr, cinephage, mediamanager services, wired into jupiter with LAN Caddy vhosts. - Gitea: migrated the old ZimaOS docker instance's data (sqlite db, 4 repos, no LFS objects) into the NixOS module's default stateDir layout. HTTP via Caddy; git SSH on its own built-in server at :2222 (not :222 - the unpriv gitea user can't bind <1024). - mediamanager-nix flake input for the mediamanager service. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
55 lines
2.2 KiB
Nix
55 lines
2.2 KiB
Nix
{ config, ... }:
|
|
|
|
# MediaManager — media request/library manager. Module comes from the
|
|
# community flake input `mediamanager-nix` (wired into jupiter's module list
|
|
# in flake.nix, NOT nixpkgs). Paired sops secret declared in
|
|
# hosts/jupiter/secrets.nix — without it the module mints+discards a random
|
|
# auth token_secret on every service restart, logging everyone out.
|
|
# Port 8010: 8000 is taken by audiobookshelf on this host.
|
|
{
|
|
services.media-manager = {
|
|
enable = true;
|
|
dataDir = "/mnt/data/AppData/mediamanager";
|
|
host = "0.0.0.0";
|
|
port = 8010;
|
|
postgres.enable = true;
|
|
environmentFile = config.sops.templates."mediamanager.env".path;
|
|
settings = {
|
|
misc = {
|
|
frontend_url = "http://mediamanager.jupiter.sol";
|
|
# Point straight at the existing library instead of the empty
|
|
# dirs under dataDir — group "users" needs write access (see
|
|
# the chmod note below); files stay darman-owned.
|
|
movie_directory = "/mnt/data/HighSeas/Movies";
|
|
tv_directory = "/mnt/data/HighSeas/Shows";
|
|
image_directory = "/mnt/data/HighSeas/images";
|
|
torrent_directory = "/mnt/data/HighSeas/Downloads";
|
|
};
|
|
auth.admin_emails = [ "mail@erik-s.dev" ];
|
|
# API keys are secret -> env vars via the sops template below, not here
|
|
# (settings.* is rendered to a world-readable file in /nix/store).
|
|
torrents.sabnzbd = {
|
|
enabled = true;
|
|
host = "http://localhost";
|
|
port = 8085;
|
|
};
|
|
indexers.prowlarr = {
|
|
enabled = true;
|
|
url = "http://localhost:9696";
|
|
};
|
|
};
|
|
};
|
|
|
|
sops.templates."mediamanager.env".content = ''
|
|
MEDIAMANAGER_AUTH__TOKEN_SECRET=${config.sops.placeholder.mediamanager_token_secret}
|
|
MEDIAMANAGER_TORRENTS__SABNZBD__API_KEY=${config.sops.placeholder.sabnzbd_api_key}
|
|
MEDIAMANAGER_INDEXERS__PROWLARR__API_KEY=${config.sops.placeholder.prowlarr_api_key}
|
|
'';
|
|
|
|
# HighSeas/{Movies,Shows,images,Downloads} are darman:users 755 on disk —
|
|
# group has no write bit. media-manager is in "users" (below); the dirs
|
|
# themselves were chmod g+w by hand once (not declarative — see CLAUDE.md
|
|
# gotchas), since this is pre-existing data, not something tmpfiles owns.
|
|
users.users.media-manager.extraGroups = [ "users" ];
|
|
}
|