clan-infra/modules/web01/gitea/default.nix

44 lines
992 B
Nix
Raw Normal View History

2023-07-13 09:05:07 +00:00
{ pkgs, self, ... }: {
2023-07-04 17:56:58 +00:00
2023-07-13 09:05:07 +00:00
imports = [
./postgresql.nix
./actions-runner.nix
];
2023-07-04 17:56:58 +00:00
services.gitea = {
enable = true;
database = {
type = "postgres";
host = "/run/postgresql";
port = 5432;
};
2023-07-13 09:05:07 +00:00
package = self.packages.${pkgs.hostPlatform.system}.gitea;
settings.actions.ENABLED = true;
2023-07-04 17:56:58 +00:00
settings.mailer = {
ENABLED = true;
FROM = "gitea@clan.lol";
2023-07-05 10:52:45 +00:00
HOST = "localhost:25";
2023-07-04 17:56:58 +00:00
};
settings.log.LEVEL = "Error";
2023-07-05 13:22:57 +00:00
settings.service.DISABLE_REGISTRATION = false;
2023-07-04 17:56:58 +00:00
settings.metrics.ENABLED = true;
settings.server = {
2023-07-13 09:17:56 +00:00
APP_DATA_PATH = "/var/lib/gitea/data";
2023-07-04 17:56:58 +00:00
DISABLE_ROUTER_LOG = true;
ROOT_URL = "https://git.clan.lol";
HTTP_PORT = 3002;
DOMAIN = "git.clan.lol";
2023-10-24 16:13:48 +00:00
LANDING_PAGE = "explore";
2023-07-04 17:56:58 +00:00
};
};
services.nginx.virtualHosts."git.clan.lol" = {
forceSSL = true;
enableACME = true;
locations."/".extraConfig = ''
proxy_pass http://localhost:3002;
'';
};
}