From 608de579241829feddecb4a70f2a8a02c059b0c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Sun, 17 May 2026 01:29:19 +0200 Subject: [PATCH] hive-forge: default to pkgs.forgejo (15.x), expose package option nixpkgs's services.forgejo defaults to forgejo-lts (11.0.13 today); LTS lags far enough behind that any prior non-LTS run against the same state dir leaves the DB at a migration the LTS binary can't read ('database newer than binary, refusing to start'). default to the latest release line and let operators opt down to LTS by overriding services.hive-forge.package. --- nix/modules/hive-forge.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/nix/modules/hive-forge.nix b/nix/modules/hive-forge.nix index 743834f..b5ded52 100644 --- a/nix/modules/hive-forge.nix +++ b/nix/modules/hive-forge.nix @@ -60,6 +60,21 @@ in ''; }; + package = lib.mkOption { + type = lib.types.package; + default = pkgs.forgejo; + defaultText = lib.literalExpression "pkgs.forgejo"; + description = '' + Forgejo package to run inside the container. Defaults to + `pkgs.forgejo` (the latest release line) rather than the + nixpkgs-module default of `pkgs.forgejo-lts`, because LTS + lags far behind on schema and the DB easily ends up "newer + than the binary" if the operator ever ran a non-LTS forgejo + against the same state dir. Override to `pkgs.forgejo-lts` + if you actively want the slower release train. + ''; + }; + openFirewall = lib.mkOption { type = lib.types.bool; default = true; @@ -87,6 +102,7 @@ in system.stateVersion = "25.11"; services.forgejo = { enable = true; + package = cfg.package; database.type = "sqlite3"; lfs.enable = true; settings = {