Migrate Immich on lyra to the native NixOS service stack #31

Open
opened 2026-07-01 18:55:03 +01:00 by nimmo · 0 comments
Owner

Goal

Replace the Docker-based Immich stack on lyra with the native NixOS Immich service stack, including its database, Redis cache, and machine-learning component.

Acceptance Checklist

  • Reconstruct the current Immich container layout, bind mounts, and any published ports.
  • Define the target data layout under a NixOS-managed path.
  • Use the native services.immich module with PostgreSQL and Redis support rather than re-creating the Compose topology by hand.
  • Wire GPU and media/transcoding access explicitly for lyra.
  • Move secrets into a SOPS-managed secrets file rather than embedding them in the Nix store.
  • Migrate the database with a dump/restore path instead of copying container database files.
  • Validate uploads, browsing, background jobs, and machine-learning tasks before retiring the Docker stack.

Context

services.immich now has strong native coverage in nixpkgs, including built-in database, Redis, machine-learning, media location, acceleration-device, and secrets-file support. The complexity is operational state, not module availability.

Guardrails

  • Do not copy PostgreSQL data directories directly from Docker into native PostgreSQL.
  • Do not assume the current reverse-proxy target or media paths are worth preserving unchanged; verify them first.
  • Treat this as a later migration than lower-state services if the live stack turns out to be carrying more state than expected.
## Goal Replace the Docker-based Immich stack on `lyra` with the native NixOS Immich service stack, including its database, Redis cache, and machine-learning component. ## Acceptance Checklist - Reconstruct the current Immich container layout, bind mounts, and any published ports. - Define the target data layout under a NixOS-managed path. - Use the native `services.immich` module with PostgreSQL and Redis support rather than re-creating the Compose topology by hand. - Wire GPU and media/transcoding access explicitly for `lyra`. - Move secrets into a SOPS-managed secrets file rather than embedding them in the Nix store. - Migrate the database with a dump/restore path instead of copying container database files. - Validate uploads, browsing, background jobs, and machine-learning tasks before retiring the Docker stack. ## Context `services.immich` now has strong native coverage in nixpkgs, including built-in database, Redis, machine-learning, media location, acceleration-device, and secrets-file support. The complexity is operational state, not module availability. ## Guardrails - Do not copy PostgreSQL data directories directly from Docker into native PostgreSQL. - Do not assume the current reverse-proxy target or media paths are worth preserving unchanged; verify them first. - Treat this as a later migration than lower-state services if the live stack turns out to be carrying more state than expected.
Sign in to join this conversation.
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
nimmo/nixos-config#31
No description provided.