gitea
This commit is contained in:
29
hosts/nas/apps/gitea/default.nix
Normal file
29
hosts/nas/apps/gitea/default.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
stateDir = "/media/nas/ssd/nix-app-data/gitea";
|
||||
useWizard = false;
|
||||
mailerPasswordFile = config.sops.secrets."jallen-nas/gitea/mail-key".path;
|
||||
metricsTokenFile = config.sops.secrets."jallen-nas/gitea/metrics-key".path;
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "jallen-nas";
|
||||
HTTP_ADDR = "0.0.0.0";
|
||||
HTTP_PORT = 3000;
|
||||
PROTOCOL = "http";
|
||||
ROOT_URL = "https://gitea.mjallen.dev/";
|
||||
};
|
||||
service = {
|
||||
REGISTER_EMAIL_CONFIRM = false;
|
||||
ENABLE_CAPTCHA = false;
|
||||
DISABLE_REGISTRATION = true;
|
||||
ENABLE_OPENID_SIGNIN = false;
|
||||
ENABLE_LDAP_SIGNIN = false;
|
||||
ENABLE_SSH_SIGNIN = true;
|
||||
ENABLE_BUILTIN_SSH_SERVER = true;
|
||||
ENABLE_REVERSE_PROXY_AUTHENTICATION = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -11,7 +11,7 @@ with lib;
|
||||
|
||||
port = mkOption {
|
||||
type = types.str;
|
||||
default = "3000";
|
||||
default = "3003";
|
||||
};
|
||||
|
||||
port2 = mkOption {
|
||||
|
||||
@@ -11,7 +11,7 @@ with lib;
|
||||
|
||||
port = mkOption {
|
||||
type = types.str;
|
||||
default = "3000";
|
||||
default = "3023";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
|
||||
@@ -12,6 +12,7 @@ let
|
||||
openWebUIUrl = "http://10.0.1.18:8888";
|
||||
paperlessUrl = "http://10.0.1.20:28981";
|
||||
cacheUrl = "http://10.0.1.18:5000";
|
||||
giteaUrl = "http://10.0.1.18:3000";
|
||||
in
|
||||
{
|
||||
networking.firewall = {
|
||||
@@ -177,6 +178,11 @@ in
|
||||
url = paperlessUrl;
|
||||
}
|
||||
];
|
||||
gitea.loadBalancer.servers = [
|
||||
{
|
||||
url = giteaUrl;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
routers = {
|
||||
@@ -218,6 +224,12 @@ in
|
||||
service = "jellyseerr";
|
||||
tls.certResolver = "letsencrypt";
|
||||
};
|
||||
gitea = {
|
||||
entryPoints = [ "websecure" ];
|
||||
rule = "Host(`gitea.${domain}`)";
|
||||
service = "gitea";
|
||||
tls.certResolver = "letsencrypt";
|
||||
};
|
||||
hass = {
|
||||
entryPoints = [ "websecure" ];
|
||||
rule = "Host(`hass.${domain}`)";
|
||||
|
||||
Reference in New Issue
Block a user