2017-04-11 19:39:57 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
with import <stockholm/lib>;
|
|
|
|
|
|
|
|
{
|
|
|
|
services.nginx.virtualHosts.paste = {
|
|
|
|
serverAliases = [ "p.r" ];
|
|
|
|
locations."/".extraConfig = ''
|
2017-04-11 19:50:01 +00:00
|
|
|
client_max_body_size 4G;
|
2017-04-11 19:39:57 +00:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_pass http://localhost:9081;
|
|
|
|
'';
|
|
|
|
};
|
2019-04-13 19:41:58 +00:00
|
|
|
services.nginx.virtualHosts.paste-readonly = {
|
|
|
|
serverAliases = [ "p.krebsco.de" ];
|
|
|
|
locations."/".extraConfig = ''
|
|
|
|
if ($request_method != GET) {
|
|
|
|
return 403;
|
|
|
|
}
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_pass http://localhost:9081;
|
|
|
|
'';
|
|
|
|
};
|
2017-04-11 19:39:57 +00:00
|
|
|
krebs.htgen.paste = {
|
|
|
|
port = 9081;
|
|
|
|
script = toString [
|
|
|
|
"PATH=${makeBinPath [
|
|
|
|
pkgs.nix
|
|
|
|
]}:$PATH"
|
|
|
|
"STATEDIR=$HOME"
|
|
|
|
". ${pkgs.htgen}/examples/paste"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
krebs.iptables.tables.filter.INPUT.rules = [
|
|
|
|
{ predicate = "-i retiolum -p tcp --dport 80"; target = "ACCEPT";}
|
|
|
|
{ predicate = "-i retiolum -p tcp --dport 9081"; target = "ACCEPT";}
|
|
|
|
];
|
|
|
|
}
|