Add Nixflix Stack #45

Merged
cameron merged 6 commits from add-media-stack into main 2026-07-07 21:33:13 -04:00
Owner

Summary

Adds a declarative media stack for vanhouzen using Nixflix, including Sonarr, Radarr, Prowlarr, SABnzbd, Jellyfin, and Seerr.

Changes

  • Added nixflix as a pinned flake input at v2.1.0.
  • Enabled the Nixflix NixOS module for the vanhouzen configuration.
  • Added vanhouzen/media.nix to configure:
    • Sonarr for TV management.
    • Radarr for movie management.
    • Prowlarr for indexer management.
    • SABnzbd as the Usenet download client.
    • Jellyfin with a declarative admin user.
    • Seerr for request management.
    • Caddy reverse proxy integration for media service subdomains.
  • Added agenix-managed secrets for media stack API keys, passwords, provider credentials, and indexer credentials.
  • Configured the media stack to use /srv/media for libraries and downloads so imports can use hardlinks/atomic moves.
  • Ensured media services depend on /srv/media being mounted before startup.
  • Enabled unfree packages for vanhouzen to support SABnzbd archive extraction.
  • Updated storage tmpfiles config so /srv/media ownership is managed by Nixflix instead of a conflicting tmpfiles rule.
## Summary Adds a declarative media stack for `vanhouzen` using Nixflix, including Sonarr, Radarr, Prowlarr, SABnzbd, Jellyfin, and Seerr. ## Changes - Added `nixflix` as a pinned flake input at `v2.1.0`. - Enabled the Nixflix NixOS module for the `vanhouzen` configuration. - Added `vanhouzen/media.nix` to configure: - Sonarr for TV management. - Radarr for movie management. - Prowlarr for indexer management. - SABnzbd as the Usenet download client. - Jellyfin with a declarative admin user. - Seerr for request management. - Caddy reverse proxy integration for media service subdomains. - Added agenix-managed secrets for media stack API keys, passwords, provider credentials, and indexer credentials. - Configured the media stack to use `/srv/media` for libraries and downloads so imports can use hardlinks/atomic moves. - Ensured media services depend on `/srv/media` being mounted before startup. - Enabled unfree packages for `vanhouzen` to support SABnzbd archive extraction. - Updated storage tmpfiles config so `/srv/media` ownership is managed by Nixflix instead of a conflicting tmpfiles rule.
Set up a declarative media server on vanhouzen using the Nixflix flake
(pinned to v2.1.0), which enables and cross-wires Prowlarr, Sonarr, Radarr,
SABnzbd, Jellyfin, and Seerr through their REST APIs with TRaSH-guides
defaults and a PostgreSQL backend.

- flake.nix/flake.lock: add pinned nixflix input (nixpkgs follows ours) and
  its module on the vanhouzen system.
- vanhouzen/media.nix: new module. Library + downloads on the existing
  bulk/media ZFS dataset (/srv/media) for hardlink imports; state on the root
  disk. Services published at <name>.vanhouzen.me via the existing Caddy with
  automatic HTTPS. Secrets consumed through agenix (._secret file paths, read
  as root). Explicit srv-media.mount ordering for the setup and SABnzbd units,
  since the bulk pool is USB-backed with nofail (mirrors immich.nix).
- configuration.nix: import media.nix.
- secrets/secrets.nix: declare the new media-stack .age secrets.
- storage.nix: hand /srv/media ownership to Nixflix (0775 root:media) to avoid
  a conflicting tmpfiles rule.

Secrets, the usenet provider host, and DNS records still need to be provided
before nixos-rebuild.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- media.nix: set the SABnzbd server to Frugal Usenet
  (news.frugalusenet.com:563, SSL) and configure NZBgeek in Prowlarr's
  indexers list (name matches Prowlarr's built-in definition; API key via
  the new indexer-nzbgeek agenix secret).
- secrets/secrets.nix: declare indexer-nzbgeek.age.

Still pending before rebuild: create the agenix secrets (now including
indexer-nzbgeek) and add DNS records.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Caught by evaluating nixosConfigurations.vanhouzen before deploy:

- The pinned nixflix v2.1.0 nests the download client under
  nixflix.usenetClients.sabnzbd (the flattened nixflix.sabnzbd alias only
  exists on unstable/main). Correct the option path.
- SABnzbd pulls in unrar (unfreeRedistributable). vanhouzen keeps unfree
  disabled, so allow just unrar via allowUnfreePredicate rather than enabling
  allowUnfree globally like the other hosts.

The vanhouzen system now evaluates to a valid toplevel derivation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cameron deleted branch add-media-stack 2026-07-07 21:33:13 -04:00
cameron referenced this pull request from a commit 2026-07-07 21:33:14 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cameron/infrastructure!45
No description provided.