48 lines
987 B
Nix
48 lines
987 B
Nix
{ config, ... }:
|
|
let
|
|
cfg = config.services.forgejo;
|
|
srv = cfg.settings.server;
|
|
in {
|
|
services.nginx.virtualHosts.${srv.DOMAIN} = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
extraConfig = ''
|
|
client_max_body_size 512M;
|
|
'';
|
|
locations."/".proxyPass = "http://localhost:${builtins.toString srv.HTTP_PORT}";
|
|
};
|
|
|
|
services.forgejo = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
server = {
|
|
DOMAIN = "git.tokinanpa.dev";
|
|
ROOT_URL = "https://${srv.DOMAIN}/";
|
|
};
|
|
|
|
service = {
|
|
DISABLE_REGISTRATION = true;
|
|
};
|
|
|
|
repository = {
|
|
DEFAULT_REPO_UNITS = "repo.code,repo.releases,repo.issues";
|
|
DISABLE_STARS = true;
|
|
|
|
ENABLE_PUSH_CREATE_USER = true;
|
|
DEFAULT_PUSH_CREATE_PRIVATE = false;
|
|
|
|
PREFERRED_LICENSES = "MIT";
|
|
};
|
|
|
|
ui = {
|
|
DEFAULT_THEME = "forgejo-dark";
|
|
DEFAULT_SHOW_FULL_NAME = true;
|
|
|
|
};
|
|
|
|
mirror.DEFAULT_INTERVAL = "1h";
|
|
};
|
|
};
|
|
}
|