52 lines
1,002 B
Nix
52 lines
1,002 B
Nix
|
{ config, ... }:
|
||
|
let
|
||
|
forgejoUrl = "git.dalaran.fr";
|
||
|
forgejoPort = config.services.forgejo.settings.server.HTTP_PORT;
|
||
|
in
|
||
|
{
|
||
|
services.nginx.virtualHosts.${forgejoUrl} = {
|
||
|
forceSSL = true;
|
||
|
enableACME = true;
|
||
|
extraConfig = ''
|
||
|
client_max_body_size 512M;
|
||
|
'';
|
||
|
|
||
|
locations."/" = {
|
||
|
recommendedProxySettings = true;
|
||
|
proxyPass = "http://localhost:${toString forgejoPort}";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
services.forgejo = {
|
||
|
enable = true;
|
||
|
|
||
|
database = {
|
||
|
type = "postgres";
|
||
|
createDatabase = true;
|
||
|
};
|
||
|
|
||
|
stateDir = "/srv/forgejo";
|
||
|
dump.enable = true;
|
||
|
|
||
|
lfs.enable = true;
|
||
|
|
||
|
settings = {
|
||
|
DEFAULT = {
|
||
|
APP_NAME = "Dala's Git server";
|
||
|
};
|
||
|
server = {
|
||
|
DOMAIN = forgejoUrl;
|
||
|
ROOT_URL = "https://${forgejoUrl}";
|
||
|
HTTP_ADDR = "127.0.0.1";
|
||
|
LANDING_PAGE = "/dala";
|
||
|
};
|
||
|
session = {
|
||
|
COOKIE_SECURE = true;
|
||
|
};
|
||
|
service = {
|
||
|
DISABLE_REGISTRATION = true;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|