nixos-config/modules/system/services/server/forgejo/default.nix

40 lines
1 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2024-10-09 03:36:08 -04:00
{
imports = [ ./nginx ];
config = lib.mkIf config.system.server.enable {
services.forgejo = {
enable = true;
package = pkgs.forgejo;
settings = {
server = {
2025-02-25 03:03:43 -05:00
DOMAIN = "git.nixfox.ca";
ROOT_URL = "https://git.nixfox.ca:443";
HTTP_PORT = 3110;
SSH_PORT = 2299;
START_SSH_SERVER = true;
};
mailer = {
ENABLED = true;
2025-02-25 03:03:43 -05:00
SMTP_ADDR = "mx.nixfox.ca";
FROM = "NixFox Git <noreply@nixfox.ca>";
USER = "noreply@nixfox.ca";
PASSWD = config.secrets.noreplyPassword;
PROTOCOL = "smtps";
};
service = {
REGISTER_EMAIL_CONFIRM = true;
DISABLE_REGISTRATION = true;
};
ui.DEFAULT_THEME = "forgejo-dark";
2024-09-20 02:30:50 -04:00
};
};
networking.firewall.allowedTCPPorts = [ 2299 ];
2025-02-25 03:03:43 -05:00
services.ddclient.domains = [ "git.nixfox.ca" ];
environment.persistence."/persist".directories = [ "/var/lib/forgejo" ];
};
2024-09-20 02:30:50 -04:00
}