nix-config/modules/selfhosted/forgejo/default.nix

33 lines
780 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;
LANDING_PAGE = "explore";
};
service.DISABLE_REGISTRATION = true;
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;
};
};
}