Package the panel as a Nix flake with a NixOS module

The panel now lives in its own repository instead of the nixos config.
The flake provides:

- packages.<system>.default: panelctl plus a panel-api wrapper, with the
  frontend under share/panel and runtime tools appended to PATH
- nixosModules.default: services.reudy-panel (service, directories,
  shared routes group, Caddy vhost with optional Authelia forward_auth,
  routes import and reload path unit, Forgejo integration)
- overlays.default, and checks that build the package and evaluate a
  host using the module

panelctl takes the routes file owner from PANEL_USER/PANEL_GROUP
instead of hardcoding reudy:panelroutes (defaults unchanged).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UbWSNkXxZhYf7eqHTyx3Bf
This commit is contained in:
agent 2026-09-27 17:51:55 +00:00
parent b27bbc19cb
commit e11fc00840
8 changed files with 401 additions and 3 deletions

View file

@ -26,7 +26,7 @@ FRONTEND_DIR = os.environ.get(
os.path.join(os.path.dirname(os.path.abspath(__file__)), "frontend"),
)
# Optional Forgejo instance (set from panel.nix). The API URL may be an internal
# Optional Forgejo instance (set by the NixOS module). The API URL may be an internal
# address; the public URL is what repositories are cloned from and linked to.
FORGEJO_URL = os.environ.get("PANEL_FORGEJO_URL", "").rstrip("/")
FORGEJO_API_URL = (os.environ.get("PANEL_FORGEJO_API_URL", "") or FORGEJO_URL).rstrip("/")