diff options
author | tv <tv@krebsco.de> | 2020-05-05 16:44:53 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2020-05-05 17:49:28 +0200 |
commit | ebecabd51783ade50cbccfdd5f0026144fc2dceb (patch) | |
tree | 0d89a3f3dc82f55d4cd272cf4ad73b9410c73c4b /tv/2configs | |
parent | d437145ae1c3f5b4a4975cc681e6c0eadf05712f (diff) |
tv imgur config: init
Diffstat (limited to 'tv/2configs')
-rw-r--r-- | tv/2configs/imgur.nix | 25 |
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) + ''; + }; +} |