nix-config/modules/selfhosted/forgejo/default.nix
2026-03-11 22:44:19 +01:00

32 lines
743 B
Nix

{ ... }:
{
flake.modules.nixos.forgejo =
{
pkgs,
config,
lib,
...
}:
{
services.forgejo = {
enable = true;
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.dnsc.io";
ROOT_URL = "https://git.dnsc.io/";
HTTP_PORT = 9004;
SSH_PORT = lib.head config.services.openssh.ports;
};
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;
};
};
}