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.
This commit is contained in:
parent
2192cb5148
commit
608de57924
1 changed files with 16 additions and 0 deletions
|
|
@ -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 {
|
openFirewall = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
|
@ -87,6 +102,7 @@ in
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
services.forgejo = {
|
services.forgejo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = cfg.package;
|
||||||
database.type = "sqlite3";
|
database.type = "sqlite3";
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue