From 69098a48472be34c5efc6ce449074482e73cbcd6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 14 Oct 2015 19:19:34 +0200 Subject: use go as url-shortener for newsbot-js --- krebs/3modules/lass/default.nix | 1 + krebs/Zhosts/go | 13 ------------- lass/2configs/go.nix | 21 +++++++++++++++++---- 3 files changed, 18 insertions(+), 17 deletions(-) delete mode 100644 krebs/Zhosts/go diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 9dbc597ed..afedf95f2 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -21,6 +21,7 @@ with import ../../4lib { inherit lib; }; aliases = [ "echelon.retiolum" "cgit.echelon.retiolum" + "go.retiolum" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- diff --git a/krebs/Zhosts/go b/krebs/Zhosts/go deleted file mode 100644 index de9ebeb78..000000000 --- a/krebs/Zhosts/go +++ /dev/null @@ -1,13 +0,0 @@ -Subnet = 10.243.109.132 -Subnet = 42:f9f0:be1f:b191:116a:3db0:d546:70d2 -# dn42 routing -Subnet = 172.22.0.0/15 - ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEApKt/lYqRgl4KE1ouSi5nbt7n7FEjECkGtkRhLFDJs0uWNvPj7wEh -nTtqzk7lJ8upHgmNN+1w98n2bcJ7Qcbz8vCcMEO7MXdlzGH9vet/g6ZgQ/Z1ijHl -IxYeH7yyBDLoJ2gghMhiSF0cezFDmNKPMhN+cGr9Lou54igK3I5CMIMN8cx0Fu0G -uLAxvnZfxIzzCnrF9xvZ6i3g/rEcaGjxmAysCW8SQdRmBKlkzQaUbLy39V2Z5y6m -SWR7gIGgMVCkpSeWUVSi05wgnMhoEu6LEYTBy/3bPK96O/Y7JBVpYUHqk/ya2PNR -eaHfEpCrKsek4t/5hcLk64Eo/ydzeU+gAQIDAQAB ------END RSA PUBLIC KEY----- diff --git a/lass/2configs/go.nix b/lass/2configs/go.nix index 30d3e6ae5..81a02ec7c 100644 --- a/lass/2configs/go.nix +++ b/lass/2configs/go.nix @@ -1,5 +1,6 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: +with lib; { imports = [ ../3modules/go.nix @@ -10,7 +11,19 @@ lass.go = { enable = true; }; - krebs.iptables.tables.filter.INPUT.rules = [ - { predicate = "-i retiolum -p tcp --dport 1337"; target = "ACCEPT"; } - ]; + krebs.nginx = { + enable = true; + servers.go = { + locations = [ + (nameValuePair "/" '' + proxy_set_header Host go; + proxy_pass http://localhost:1337; + '') + ]; + server-names = [ + "go" + "go.retiolum" + ]; + }; + }; } -- cgit v1.2.3 [cgit] Unable to lock slot /tmp/cgit/95100000.lock: No such file or directory (2)