configures forgejo

This commit is contained in:
Dennis Schoepf 2026-03-11 22:42:54 +01:00
parent 31976a7c9c
commit 1e9cacb761
5 changed files with 42 additions and 0 deletions

View file

@ -62,6 +62,9 @@ in
secrets."restic/password" = {
file = "${secretsDir}/restic/password.age";
};
secrets."forgejo/mail-password" = {
file = "${secretsDir}/forgejo/mail-password.age";
};
};
# Custom Module Options

View file

@ -35,6 +35,9 @@
virtualHosts."notes.dnsc.io".extraConfig = ''
reverse_proxy localhost:9003
'';
virtualHosts."git.dnsc.io".extraConfig = ''
reverse_proxy localhost:9004
'';
};
};
}

View file

@ -0,0 +1,26 @@
{ ... }:
{
flake.modules.nixos.forgejo =
{ pkgs, config, ... }:
{
services.forgejo = {
enable = true;
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.dnsc.io";
ROOT_URL = "https://git.dnsc.io/";
HTTP_PORT = 9004;
};
service.DISABLE_REGISTRATION = false;
mailer = {
ENABLED = true;
SMTP_ADDR = "me@dnsc.io";
FROM = "git@dnsc.io";
USER = "git@dnsc.io";
};
};
secrets.mailer.PASSWD = config.age.secrets."forgejo/mail-password".path;
};
};
}