nixos/hosts/architect/gitea.nix

35 lines
761 B
Nix
Raw Permalink Normal View History

{ config, lib, ... }:
let
domain = "git.giugl.io";
2022-11-29 12:24:48 +00:00
in
{
2023-06-05 03:41:10 +01:00
architect = {
firewall.openTCP = [ config.services.gitea.settings.server.SSH_PORT ];
vhost.${domain} = {
2023-10-21 14:00:58 +01:00
dnsInterfaces = [ "lan" "tailscale" ];
2023-11-16 12:28:06 +00:00
locations."/" = {
port = config.services.gitea.settings.server.HTTP_PORT;
allowWAN = true;
};
2023-06-05 03:41:10 +01:00
};
};
2021-07-07 13:13:19 +01:00
services.gitea = {
2021-11-25 11:42:32 +00:00
enable = true;
database.type = "sqlite3";
appName = "Gitea";
2023-06-03 00:46:08 +01:00
# https://github.com/NixOS/nixpkgs/issues/235442#issuecomment-1574329453
lfs.enable = true;
2022-11-29 12:24:48 +00:00
settings = {
2022-12-01 13:27:05 +00:00
server = {
2023-05-27 23:16:46 +01:00
DOMAIN = domain;
ROOT_URL = "https://${domain}";
2022-12-01 13:27:05 +00:00
SSH_PORT = 22;
2023-06-05 03:41:10 +01:00
HTTP_PORT = 3001;
2022-12-01 13:27:05 +00:00
};
2022-11-29 12:24:48 +00:00
openid.enable_openid_signin = true;
};
2021-07-07 13:13:19 +01:00
};
}