feat(nixos): deploy Gitea on Pikachu
This commit was merged in pull request #212.
This commit is contained in:
1 parent
c370d635e5
commit
d342370b89
6 files changed
+142
-14
No files matched your search
@@ -1,11 +1,9 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
registry,
|
||||
...
|
||||
}:
|
||||
let
|
||||
giteaSshBackend = "10.23.20.45:2022";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.guests.reverse-proxy.enable {
|
||||
guests.reverse-proxy = {
|
||||
@@ -13,11 +11,6 @@ in
|
||||
modules.services.reverse-proxy.enable = true;
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
"git.alexion.dev" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/".proxyPass = "http://10.23.20.32";
|
||||
};
|
||||
"photos.alexion.dev" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
@@ -45,12 +38,12 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 2022 ];
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
|
||||
services.nginx.streamConfig = ''
|
||||
server {
|
||||
listen 2022;
|
||||
proxy_pass ${giteaSshBackend};
|
||||
listen 22;
|
||||
proxy_pass ${registry.address.${config.networking.hostName}.gitea}:2222;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user