summaryrefslogtreecommitdiffstats
path: root/tv/2configs/imgur.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-06-07 19:51:47 +0200
committermakefu <github@syntax-fehler.de>2020-06-07 19:51:47 +0200
commit8dc4c3d153f4f6536815dbb122bf5465ed3a800a (patch)
tree584ff99e146b1b1a40ff1b2ab026de00a984eb0d /tv/2configs/imgur.nix
parent54502928f633568c694cac94dfd4de527c8414bc (diff)
parent8ae780cf2689a0e62718fe0dcc8b80e584f68d23 (diff)
Merge remote-tracking branch 'tv/master'
Diffstat (limited to 'tv/2configs/imgur.nix')
-rw-r--r--tv/2configs/imgur.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/tv/2configs/imgur.nix b/tv/2configs/imgur.nix
new file mode 100644
index 000000000..ba84fd2df
--- /dev/null
+++ b/tv/2configs/imgur.nix
@@ -0,0 +1,25 @@
+with import <stockholm/lib>;
+{ config, pkgs, ... }: {
+
+ services.nginx.virtualHosts."ni.r" = {
+ locations."/image" = {
+ extraConfig = /* nginx */ ''
+ client_max_body_size 20M;
+
+ proxy_set_header Host $host;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+
+ proxy_pass http://127.0.0.1:${toString config.krebs.htgen.imgur.port};
+ proxy_pass_header Server;
+ '';
+ };
+ };
+
+ krebs.htgen.imgur = {
+ port = 7771;
+ script = /* sh */ ''
+ (. ${pkgs.htgen-imgur}/bin/htgen-imgur)
+ '';
+ };
+}