From 1a21acc8ee892bdc85455678df14f0793e2949ad Mon Sep 17 00:00:00 2001 From: "hermitcollective.net" Date: Mon, 26 Aug 2024 15:53:08 +0000 Subject: [PATCH] Akkoma support --- services/akkoma-media.nix | 17 +++++++++++++++++ services/akkoma.nix | 17 +++++++++++++++++ services/default.nix | 2 ++ services/nginx.nix | 3 +-- 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 services/akkoma-media.nix create mode 100644 services/akkoma.nix diff --git a/services/akkoma-media.nix b/services/akkoma-media.nix new file mode 100644 index 0000000..b97688c --- /dev/null +++ b/services/akkoma-media.nix @@ -0,0 +1,17 @@ +{ + # Reqeusts SSL and adds the site to nginx + services.nginx.virtualHosts."media.nederland.gay" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://192.168.178.243/"; + proxyWebsockets = true; # needed if you need to use WebSocket + extraConfig = + # required when the target is also TLS server with multiple hosts + "proxy_ssl_server_name on;" + + # required when the server wants to use HTTP Authentication + "proxy_pass_header Authorization;" + ; + }; + }; +} diff --git a/services/akkoma.nix b/services/akkoma.nix new file mode 100644 index 0000000..777a43d --- /dev/null +++ b/services/akkoma.nix @@ -0,0 +1,17 @@ +{ + # Reqeusts SSL and adds the site to nginx + services.nginx.virtualHosts."nederland.gay" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://192.168.178.243/"; + proxyWebsockets = true; # needed if you need to use WebSocket + extraConfig = + # required when the target is also TLS server with multiple hosts + "proxy_ssl_server_name on;" + + # required when the server wants to use HTTP Authentication + "proxy_pass_header Authorization;" + ; + }; + }; +} diff --git a/services/default.nix b/services/default.nix index 633e196..d21a6c4 100644 --- a/services/default.nix +++ b/services/default.nix @@ -7,5 +7,7 @@ ./owncast.nix ./uptime-kuma.nix ./iceshrimp.nix + ./akkoma.nix + ./akkoma-media.nix ]; } diff --git a/services/nginx.nix b/services/nginx.nix index ba894e1..da50eea 100644 --- a/services/nginx.nix +++ b/services/nginx.nix @@ -1,4 +1,3 @@ - { services.nginx = { enable = true; @@ -6,7 +5,7 @@ recommendedOptimisation = true; recommendedProxySettings = true; recommendedTlsSettings = true; - clientMaxBodySize = "50m"; + clientMaxBodySize = "100m"; }; }