hosts/suwako: move gitea from marisa to suwako
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
./nginx.nix
|
||||
./pufferpanel.nix
|
||||
./filehost.nix
|
||||
./gitea.nix
|
||||
];
|
||||
|
||||
virtualisation.docker = {
|
||||
@@ -18,5 +19,15 @@
|
||||
settings.PermitRootLogin = "yes";
|
||||
ports = [ 22 ];
|
||||
};
|
||||
|
||||
postgresql = {
|
||||
enable = true;
|
||||
authentication = ''
|
||||
local gitea all ident map=gitea-map
|
||||
'';
|
||||
identMap = ''
|
||||
gitea-map gitea gitea
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
44
hosts/suwako/services/gitea.nix
Normal file
44
hosts/suwako/services/gitea.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
conf,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services = {
|
||||
gitea = rec {
|
||||
appName = "Natto Tea";
|
||||
enable = true;
|
||||
database = {
|
||||
name = "gitea";
|
||||
user = "gitea";
|
||||
passwordFile = "/var/secrets/giteadb.pass";
|
||||
type = "postgres";
|
||||
};
|
||||
mailerPasswordFile = "/var/secrets/giteamailer.pass";
|
||||
settings =
|
||||
let
|
||||
domain = conf.network.addresses.domain.natto;
|
||||
in
|
||||
{
|
||||
server = rec {
|
||||
HTTP_PORT = 5001;
|
||||
ROOT_URL = "https://git.${domain}";
|
||||
SSH_DOMAIN = "git.${domain}";
|
||||
SSH_PORT = 22;
|
||||
SSH_LISTEN_PORT = SSH_PORT;
|
||||
};
|
||||
mailer = rec {
|
||||
ENABLED = true;
|
||||
FROM = "masti@${domain}";
|
||||
SMTP_ADDR = "mail.${domain}";
|
||||
PROTOCOL = "smtps";
|
||||
USER = FROM;
|
||||
REGISTER_MAIL_CONFIRM = true;
|
||||
};
|
||||
oauth2_client.REGISTER_MAIL_CONFIRM = true;
|
||||
actions.ENABLED = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@@ -52,6 +52,12 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
# Gitea
|
||||
"git.${domain}" = genericHttpRProxy {
|
||||
addr = "http://${suwako}:5001";
|
||||
conf = "client_max_body_size 64M;";
|
||||
};
|
||||
|
||||
# Personal filehost
|
||||
"f.${domain}" = genericHttpRProxy { addr = "http://${suwako}:8000"; };
|
||||
};
|
||||
|
Reference in New Issue
Block a user