nixos/hosts/architect/gitea.nix

44 lines
871 B
Nix
Raw Normal View History

{ lib, ... }:
let
domain = "git.giugl.io";
network = import ./network.nix;
2022-11-29 12:24:48 +00:00
in
{
2021-07-07 13:13:19 +01:00
services.gitea = {
2021-11-25 11:42:32 +00:00
enable = true;
database.type = "sqlite3";
domain = domain;
2021-11-25 11:42:32 +00:00
appName = "Gitea";
rootUrl = "https://${domain}";
2022-11-29 12:24:48 +00:00
settings = {
2022-12-01 13:27:05 +00:00
server = {
LFS_START_SERVER = true;
SSH_PORT = 22;
};
2022-11-29 12:24:48 +00:00
openid.enable_openid_signin = true;
};
2021-07-07 13:13:19 +01:00
};
services.nginx.virtualHosts.${domain} = {
2021-07-07 13:13:19 +01:00
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:3000";
2021-07-07 13:13:19 +01:00
extraConfig = ''
allow 127.0.0.1;
allow 10.0.0.0/24;
${lib.concatMapStrings (x: "allow ${x};") network.gdevices-wg}
allow 10.4.0.0/24;
deny all;
'';
2021-07-07 13:13:19 +01:00
};
};
networking.extraHosts = ''
${network.architect-lan} ${domain}
${network.architect-wg} ${domain}
2021-07-07 13:13:19 +01:00
'';
2021-07-07 13:13:19 +01:00
}