feat (hosts/mystra)!: attempt at forgejo server
This commit is contained in:
parent
57fad610ad
commit
31ed4c0c5f
2 changed files with 32 additions and 0 deletions
|
|
@ -6,6 +6,7 @@
|
||||||
../../nixos/server.nix
|
../../nixos/server.nix
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
./taskd.nix
|
./taskd.nix
|
||||||
|
./forgejo.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
|
|
||||||
31
hosts/mystra/forgejo.nix
Normal file
31
hosts/mystra/forgejo.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.settings.forgejo;
|
||||||
|
srv = cfg.settings.server;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.nginx.virtualHosts."git.henri-saudubray.fr" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 512M;
|
||||||
|
'';
|
||||||
|
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
database.type = "postgres";
|
||||||
|
lfs.enable = true;
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
DOMAIN = "git.henri-saudubray.fr";
|
||||||
|
ROOT_URL = "https://${srv.DOMAIN}/";
|
||||||
|
HTTP_PORT = 3000;
|
||||||
|
SSH_PORT = lib.head config.services.openssh.ports;
|
||||||
|
};
|
||||||
|
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue