dotfiles/nix/hosts/hetznix/services/forgejo.nix

31 lines
735 B
Nix
Raw Normal View History

2025-01-05 15:18:56 +00:00
{ config, ... }:
{
services = {
forgejo = {
enable = true;
2025-01-05 15:18:56 +00:00
settings = {
server = {
DOMAIN = "code.oliverdavies.uk";
HTTP_PORT = 2223;
ROOT_URL = "https://${config.services.forgejo.settings.server.DOMAIN}";
2025-01-07 02:17:18 +00:00
SSH_DOMAIN = "ssh.${config.services.forgejo.settings.server.DOMAIN}";
2025-01-05 15:18:56 +00:00
};
service = {
DISABLE_REGISTRATION = true;
};
};
};
caddy.virtualHosts."${config.services.forgejo.settings.server.DOMAIN}" = {
useACMEHost = "oliverdavies.uk";
extraConfig = "reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}";
};
openssh.settings.AllowUsers = [ "forgejo" ];
};
}