add forgejo

This commit is contained in:
Chris Kruining 2025-08-07 14:09:02 +02:00
parent a8783b4709
commit e011b893e0
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
4 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,44 @@
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.services.development.forgejo;
svr = cfg.settings.server;
in
{
options.${namespace}.services.development.forgejo = {
enable = mkEnableOption "Forgejo";
};
config = mkIf cfg.enable {
services = {
forgejo = {
enable = true;
database.type = "postgres";
settings = {
server = {
# DOMAIN = "";
HTTP_PORT = 5002;
};
service.DISABLE_REGISTRATION = true;
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "forgejo";
};
};
};
services.caddy = {
enable = true;
virtualHosts = {
"git.kruining.eu".extraConfig = ''
reverse_proxy http://127.0.0.1:5002
'';
};
};
};
};
}

View file

@ -7,8 +7,15 @@
sneeuwvlok = {
services = {
authentication.authelia.enable = true;
authentication.zitadel.enable = true;
networking.ssh.enable = true;
media.enable = true;
media.nfs.enable = true;
development.forgejo.enable = true;
};
editor = {