mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
feat(forgejo): why are we here? just to suffer?
This commit is contained in:
parent
f108a20f26
commit
69d80bde5b
8 changed files with 211 additions and 9 deletions
34
nixos/servers/forgejo/forgejo.nix
Normal file
34
nixos/servers/forgejo/forgejo.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{config, ...}: let
|
||||
domain = "git.kittywit.ch";
|
||||
cfg = config.services.forgejo;
|
||||
in {
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = domain;
|
||||
ROOT_URL = "https://${domain}";
|
||||
};
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
};
|
||||
actions = {
|
||||
ENABLED = true;
|
||||
DEFAULT_ACTIONS_URL = "github";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts.${domain} = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
extraConfig = ''
|
||||
client_max_body_size 512M;
|
||||
'';
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://localhost:${toString cfg.settings.server.HTTP_PORT}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue