nixos/hosts/architect/gitea.nix

38 lines
792 B
Nix
Raw Permalink Normal View History

{ lib, ... }:
let
domain = "git.giugl.io";
network = import ./network.nix;
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}";
ssh.clonePort = 22;
settings.server.LFS_START_SERVER = 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://localhost:3000";
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
}