camelot: Add forgejo
This commit is contained in:
parent
774fc961e2
commit
67acb4e852
|
@ -44,6 +44,7 @@
|
|||
./nextcloud.nix
|
||||
./gotosocial.nix
|
||||
./matrix.nix
|
||||
./forgejo.nix
|
||||
];
|
||||
|
||||
swapDeviceUUID = "a7c628ab-c5cb-4094-89d0-19b153fbead4";
|
||||
|
|
51
configurations/camelot/forgejo.nix
Normal file
51
configurations/camelot/forgejo.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue