From 2260ebedf7fcc699ba9ca3288e355a8f8c65d930 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 11 Apr 2017 21:39:57 +0200 Subject: l 2: add paste.nix --- lass/2configs/paste.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lass/2configs/paste.nix (limited to 'lass/2configs/paste.nix') diff --git a/lass/2configs/paste.nix b/lass/2configs/paste.nix new file mode 100644 index 000000000..5fe3083f7 --- /dev/null +++ b/lass/2configs/paste.nix @@ -0,0 +1,26 @@ +{ config, pkgs, ... }: +with import ; + +{ + services.nginx.virtualHosts.paste = { + serverAliases = [ "p.r" ]; + locations."/".extraConfig = '' + proxy_set_header Host $host; + proxy_pass http://localhost:9081; + ''; + }; + 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";} + ]; +} -- cgit v1.2.3 From 575a37f00e0ee6866c72a99327921068222fc1b0 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 11 Apr 2017 21:50:01 +0200 Subject: l 2 paste: set client_max_body_size to 4G --- lass/2configs/paste.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'lass/2configs/paste.nix') diff --git a/lass/2configs/paste.nix b/lass/2configs/paste.nix index 5fe3083f7..293691c0f 100644 --- a/lass/2configs/paste.nix +++ b/lass/2configs/paste.nix @@ -5,6 +5,7 @@ with import ; services.nginx.virtualHosts.paste = { serverAliases = [ "p.r" ]; locations."/".extraConfig = '' + client_max_body_size 4G; proxy_set_header Host $host; proxy_pass http://localhost:9081; ''; -- cgit v1.2.3