summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/deployment/graphs.nix
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-04-11 21:50:29 +0200
committerlassulus <lass@lassul.us>2017-04-11 21:50:29 +0200
commit1f317b8a1a38e41cb721835ed46b2db1a5318f23 (patch)
tree5f4a6a791c4278a0709362d82ded9b7235d28112 /makefu/2configs/deployment/graphs.nix
parent575a37f00e0ee6866c72a99327921068222fc1b0 (diff)
parent9224e9c4c8432ce8d7788592b9d25cfc29440ee6 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/deployment/graphs.nix')
-rw-r--r--makefu/2configs/deployment/graphs.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/makefu/2configs/deployment/graphs.nix b/makefu/2configs/deployment/graphs.nix
new file mode 100644
index 000000000..35a724f6a
--- /dev/null
+++ b/makefu/2configs/deployment/graphs.nix
@@ -0,0 +1,37 @@
+{ config, lib, pkgs, ... }:
+
+with import <stockholm/lib>;
+let
+ external-ip = config.krebs.build.host.nets.internet.ip4.addr;
+ internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr;
+ hn = config.krebs.build.host.name;
+in {
+ krebs.bepasty.servers."paste.r".nginx.extraConfig = ''
+ if ( $server_addr = "${external-ip}" ) {
+ return 403;
+ }
+ '';
+ krebs.tinc_graphs = {
+ enable = true;
+ nginx = {
+ enable = true;
+ # TODO: remove hard-coded hostname
+ complete = {
+ extraConfig = ''
+ if ( $server_addr = "${external-ip}" ) {
+ return 403;
+ }
+ '';
+ serverAliases = [
+ "graphs.r" "graphs.retiolum"
+ "graphs.${hn}" "graphs.${hn}.retiolum"
+ ];
+ };
+ anonymous = {
+ enableSSL = true;
+ forceSSL = true;
+ enableACME = true;
+ };
+ };
+ };
+}