nix/nixos/services/forgejo.nix
2024-02-17 17:07:58 +00:00

25 lines
602 B
Nix

{config, ...}: let
cfg = config.services.forgejo;
in {
services.forgejo = {
enable = true;
dump.enable = true;
lfs.enable = true;
settings = {
server = {
ROOT_URL = "https://${cfg.settings.server.DOMAIN}";
};
service = {
DISABLE_REGISTRATION = true;
};
repository = {
ENABLE_PUSH_CREATE_USER = true;
};
};
};
services.nginx.virtualHosts.${cfg.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = true;
locations."~".proxyPass = "http://localhost:${toString cfg.settings.server.HTTP_PORT}";
};
}