2022-12-09 00:31:56 +00:00
|
|
|
with import ./lib;
|
2020-05-05 14:44:53 +00:00
|
|
|
{ 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;
|
2022-12-06 18:51:40 +00:00
|
|
|
scriptFile = "${pkgs.htgen-imgur}/bin/htgen-imgur";
|
2020-05-05 14:44:53 +00:00
|
|
|
};
|
|
|
|
}
|