2021-07-26 01:29:05 +02:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
my = config.my;
|
|
|
|
port = 3000;
|
|
|
|
in
|
|
|
|
{
|
2021-07-26 02:55:35 +02:00
|
|
|
imports = [ ./drone.nix ./drone-runners.nix ];
|
2021-07-26 01:29:05 +02:00
|
|
|
services.gitea = {
|
|
|
|
enable = true;
|
|
|
|
domain = "git.${my.subZone}";
|
|
|
|
rootUrl = "https://git.${my.subZone}/";
|
|
|
|
httpAddress = "127.0.0.1";
|
|
|
|
httpPort = port;
|
|
|
|
database.type = "postgres";
|
2022-03-05 23:15:51 +01:00
|
|
|
settings = {
|
2023-02-24 00:59:59 +01:00
|
|
|
service.DISABLE_REGISTRATION = false;
|
|
|
|
log = {
|
|
|
|
level = "Warn";
|
|
|
|
};
|
2022-03-05 23:15:51 +01:00
|
|
|
openid = {
|
|
|
|
ENABLE_OPENID_SIGNUP = true;
|
|
|
|
};
|
|
|
|
oauth2_account = {
|
|
|
|
ENABLE_AUTO_REGISTRATION = true;
|
|
|
|
USERNAME = "email";
|
|
|
|
};
|
|
|
|
service = {
|
|
|
|
EMAIL_DOMAIN_WHITELIST = "ens.fr";
|
|
|
|
ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
|
|
|
|
};
|
|
|
|
};
|
2021-07-26 01:29:05 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
virtualHosts."git.${my.subZone}" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://127.0.0.1:${toString port}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|