hosts/suwako: move gitea from marisa to suwako
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
@@ -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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -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 ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -45,12 +45,11 @@ 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;
|
''
|
||||||
''
|
+ conf;
|
||||||
+ conf;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
@@ -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
|
|||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"git.${domain}" = genericHttpRProxy {
|
# Gitea
|
||||||
addr = "http://${marisa}:5001";
|
/*
|
||||||
conf = "client_max_body_size 64M;";
|
"git.${domain}" = genericHttpRProxy {
|
||||||
};
|
addr = "http://${marisa}:5001";
|
||||||
|
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";
|
||||||
|
@@ -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
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
};
|
};
|
@@ -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"; };
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user