diff options
author | lassulus <lass@lassul.us> | 2017-04-11 21:39:57 +0200 |
---|---|---|
committer | lassulus <lass@lassul.us> | 2017-04-11 21:39:57 +0200 |
commit | 2260ebedf7fcc699ba9ca3288e355a8f8c65d930 (patch) | |
tree | 060a43d47541b80e85b88ce266c67e058fb187a4 /lass/2configs/paste.nix | |
parent | c898a59d533499f7c4404bd31eb3ad6cf554819b (diff) |
l 2: add paste.nix
Diffstat (limited to 'lass/2configs/paste.nix')
-rw-r--r-- | lass/2configs/paste.nix | 26 |
1 files changed, 26 insertions, 0 deletions
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 <stockholm/lib>; + +{ + 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";} + ]; +} |