40 lines
857 B
Nix
40 lines
857 B
Nix
{ lib, ... }:
|
|
|
|
let
|
|
domain = "git.giugl.io";
|
|
network = import ./network.nix;
|
|
auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block;
|
|
in
|
|
{
|
|
services.gitea = {
|
|
enable = true;
|
|
database.type = "sqlite3";
|
|
domain = domain;
|
|
appName = "Gitea";
|
|
rootUrl = "https://${domain}";
|
|
settings = {
|
|
server = {
|
|
LFS_START_SERVER = true;
|
|
SSH_PORT = 22;
|
|
};
|
|
openid.enable_openid_signin = true;
|
|
};
|
|
};
|
|
|
|
services.nginx.virtualHosts.${domain} = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations."/" = {
|
|
proxyPass = "http://127.0.0.1:3000";
|
|
# it does not work, it breaks gitea's web portal
|
|
# extraConfig = auth_block { access_role = "git"; };
|
|
};
|
|
};
|
|
|
|
networking.extraHosts = ''
|
|
${network.architect-lan} ${domain}
|
|
${network.architect-wg} ${domain}
|
|
'';
|
|
|
|
}
|