hosts/suwako: move gitea from marisa to suwako

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2025-09-04 16:35:31 +05:30
parent c2a1654be8
commit 11a8dfebff
6 changed files with 49 additions and 31 deletions

View File

@@ -3,14 +3,11 @@
imports = [ imports = [
# ./hashicorp.nix # ./hashicorp.nix
./gitea.nix
]; ];
# Add secrets to nomad, consul and vault
virtualisation.docker = { virtualisation.docker = {
enable = true; enable = true;
daemon.settings = { daemon.settings = {
# default-cgroupns-mode = "host";
}; };
}; };
services = { services = {
@@ -21,15 +18,5 @@
22001 22001
]; ];
}; };
postgresql = {
enable = true;
authentication = ''
local gitea all ident map=gitea-map
'';
identMap = ''
gitea-map gitea gitea
'';
};
}; };
} }

View File

@@ -25,7 +25,8 @@
22001 22001
22002 22002
4444 4444
] ++ (map (x: x.sourcePort) config.networking.nat.forwardPorts); ]
++ (map (x: x.sourcePort) config.networking.nat.forwardPorts);
allowedUDPPorts = [ 17840 ]; allowedUDPPorts = [ 17840 ];
}; };
}; };

View File

@@ -45,8 +45,7 @@ in
forceSSL = ssl; forceSSL = ssl;
locations."/" = { locations."/" = {
proxyPass = toString addr; proxyPass = toString addr;
extraConfig = extraConfig = ''
''
expires $expires; expires $expires;
proxy_set_header Host $host; proxy_set_header Host $host;
'' ''
@@ -65,10 +64,11 @@ in
}; };
serverAliases = [ "www.${domain}" ]; serverAliases = [ "www.${domain}" ];
}; };
# "vault.${domain}" = genericHttpRProxy { addr = "https://${marisa}:8800"; };
# "consul.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8500"; }; # MPD server
"f.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8000"; };
"radio.${domain}" = genericHttpRProxy { addr = "http://${satori}:8001"; }; "radio.${domain}" = genericHttpRProxy { addr = "http://${satori}:8001"; };
# Some random music server I once had
/* /*
"radio.${domain}" = { "radio.${domain}" = {
addSSL = true; addSSL = true;
@@ -84,10 +84,24 @@ in
}; };
*/ */
# Gitea
/*
"git.${domain}" = genericHttpRProxy { "git.${domain}" = genericHttpRProxy {
addr = "http://${marisa}:5001"; addr = "http://${marisa}:5001";
conf = "client_max_body_size 64M;"; conf = "client_max_body_size 64M;";
}; };
*/
# Personal filehost
# "f.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8000"; };
# Hashicorp Vault
# "vault.${domain}" = genericHttpRProxy { addr = "https://${marisa}:8800"; };
# Hashicorp Consul
# "consul.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8500"; };
# Hashicorp Nomad
/* /*
"nomad.${domain}" = genericHttpRProxy { "nomad.${domain}" = genericHttpRProxy {
addr = "http://${marisa}:4646"; addr = "http://${marisa}:4646";

View File

@@ -4,6 +4,7 @@
./nginx.nix ./nginx.nix
./pufferpanel.nix ./pufferpanel.nix
./filehost.nix ./filehost.nix
./gitea.nix
]; ];
virtualisation.docker = { virtualisation.docker = {
@@ -18,5 +19,15 @@
settings.PermitRootLogin = "yes"; settings.PermitRootLogin = "yes";
ports = [ 22 ]; ports = [ 22 ];
}; };
postgresql = {
enable = true;
authentication = ''
local gitea all ident map=gitea-map
'';
identMap = ''
gitea-map gitea gitea
'';
};
}; };
} }

View File

@@ -25,15 +25,14 @@
HTTP_PORT = 5001; HTTP_PORT = 5001;
ROOT_URL = "https://git.${domain}"; ROOT_URL = "https://git.${domain}";
SSH_DOMAIN = "git.${domain}"; SSH_DOMAIN = "git.${domain}";
SSH_PORT = 22001; SSH_PORT = 22;
SSH_LISTEN_PORT = SSH_PORT; SSH_LISTEN_PORT = SSH_PORT;
}; };
mailer = rec { mailer = rec {
ENABLED = true; ENABLED = true;
FROM = "masti@${domain}"; FROM = "masti@${domain}";
TYPE = "smtp"; SMTP_ADDR = "mail.${domain}";
HOST = "mail.${domain}"; PROTOCOL = "smtps";
IS_TLS_ENABLED = true;
USER = FROM; USER = FROM;
REGISTER_MAIL_CONFIRM = true; REGISTER_MAIL_CONFIRM = true;
}; };

View File

@@ -52,6 +52,12 @@ in
''; '';
}; };
# Gitea
"git.${domain}" = genericHttpRProxy {
addr = "http://${suwako}:5001";
conf = "client_max_body_size 64M;";
};
# Personal filehost # Personal filehost
"f.${domain}" = genericHttpRProxy { addr = "http://${suwako}:8000"; }; "f.${domain}" = genericHttpRProxy { addr = "http://${suwako}:8000"; };
}; };