Add forgejo, remove authelia.

This commit is contained in:
Lorenzo Good 2025-12-28 20:49:16 -06:00
parent dfb52f269c
commit 7d90587392
Signed by: lorenzo
GPG key ID: 7FCD64BD81180ED0
8 changed files with 179 additions and 68 deletions

57
common/services/gitea.nix Normal file
View file

@ -0,0 +1,57 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf mkOption;
cfg = config.foehammer.services.forgejo;
in {
options.foehammer.services.forgejo = {
enable = mkEnableOption "Enable Gitea Server";
port = mkOption {
type = lib.types.port;
default = 8225;
description = ''
What external port to serve over.
'';
};
ssh-port = mkOption {
type = lib.types.port;
default = 2222;
description = ''
What external port to serve over.
'';
};
domain = mkOption {
type = lib.types.str;
};
};
config = mkIf cfg.enable {
services.forgejo = {
enable = true;
lfs.enable = true;
settings = {
service = {
DISABLE_REGISTRATION = true;
SHOW_REGISTRATION_BUTTON = false;
};
ui = {
SHOW_USER_EMAIL = false;
};
server = {
HTTP_PORT = cfg.port;
DOMAIN = cfg.domain;
ROOT_URL = "https://${cfg.domain}";
SSH_PORT = cfg.ssh-port;
};
};
};
};
}