Create goal card and 4 prerequisite cards for building authentik from a custom Nix derivation instead of using pkgs.authentik from nixpkgs. This removes the dependency on the nixpkgs packaging timeline and gives full version control over authentik releases. Chain: mikado/authentik-source-build Leaf nodes: authentik-api-client-generation, authentik-python-backend-derivation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.5 KiB
| title | modified | status | branch | requires | tags | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Build Authentik from Source | 2026-02-28 | active | mikado/authentik-source-build |
|
|
Build Authentik from Source
Replace pkgs.authentik from nixpkgs with a custom Nix derivation that builds authentik from source. This removes the dependency on the nixpkgs packaging timeline and gives full version control.
Motivation
The nix-container-builder runner on ringtail resolves nixpkgs via the NixOS nix registry, which pins to nixos-25.11. That channel lags behind upstream authentik releases — e.g. nixos-25.11 has 2025.10.1 while upstream is at 2025.12.4+. Building from source lets us target any release.
This also serves as practice for packaging services from source using Nix, relying on nixpkgs only for satellite dependencies (Python interpreter, Node.js, Go toolchain, system libraries).
Architecture
Authentik has four build components that must be assembled:
- API client generation — Go and TypeScript bindings generated from
schema.yml(OpenAPI) - Python backend (
authentik-django) — Django application with 60+ Python dependencies, including 4 in-tree packages and a forkeddjangorestframework - Web UI — Lit-based TypeScript frontend built with Rollup
- Go server — HTTP server binary (
cmd/server) that serves the web UI and spawns gunicorn for Django
The final package is the ak bash wrapper that orchestrates Go server + Python worker.
Source
Forge mirror: https://forge.ops.eblu.me/mirrors/authentik (upstream: goauthentik/authentik)
Reference derivation: nixpkgs pkgs/by-name/au/authentik/package.nix
What to Do
Once all prerequisites are complete:
- Assemble the component derivations into a final
ak-wrapped package incontainers/authentik/ - Update
containers/authentik/default.nixto use the custom derivation instead ofpkgs.authentik - Build and push the container:
mise run container-build-and-release authentik - Update
argocd/manifests/authentik/kustomization.yamlwith the new image tag - Update
service-versions.yamlwith the new version - Verify deployment: ArgoCD sync, UI login, OAuth2 flows
Related
- build-authentik-container — Current nixpkgs-based build (to be replaced)
- deploy-authentik — Parent deployment goal
- agent-change-process — C2 methodology