36 lines
895 B
Nix
36 lines
895 B
Nix
{ config, ... }:
|
|
let
|
|
domain = "git.cloonar.com";
|
|
in
|
|
services.nginx.virtualHosts."${domain}" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:3001/";
|
|
};
|
|
};
|
|
|
|
services.gitea = {
|
|
enable = true;
|
|
appName = "Cloonar Gitea server"; # Give the site a name
|
|
settings = {
|
|
server = {
|
|
ROOT_URL = "https://${domain}/";
|
|
HTTP_PORT = 3001;
|
|
DOMAIN = domain;
|
|
};
|
|
openid = {
|
|
ENABLE_OPENID_SIGNIN = false;
|
|
ENABLE_OPENID_SIGNUP = true;
|
|
WHITELISTED_URIS = "auth.example.com";
|
|
};
|
|
service = {
|
|
DISABLE_REGISTRATION = false;
|
|
ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
|
|
SHOW_REGISTRATION_BUTTON = false;
|
|
};
|
|
webhook.ALLOWED_HOST_LIST = "drone.cloonar.com";
|
|
};
|
|
};
|
|
}
|