From c8b8dac1dbcba9a8ca5da5ee2ee27af0da9d8f97 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 3 Apr 2016 21:44:11 +0200 Subject: ma 2 nginx/public_html: publish home --- makefu/2configs/nginx/public_html.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 makefu/2configs/nginx/public_html.nix (limited to 'makefu/2configs/nginx') diff --git a/makefu/2configs/nginx/public_html.nix b/makefu/2configs/nginx/public_html.nix new file mode 100644 index 000000000..9df8351ca --- /dev/null +++ b/makefu/2configs/nginx/public_html.nix @@ -0,0 +1,15 @@ +{ config, lib, ... }: + +with config.krebs.lib; + +{ + krebs.nginx = { + enable = true; + servers.default.locations = [ + (nameValuePair "~ ^/~(.+?)(/.*)?\$" '' + alias /home/$1/public_html$2; + autoindex on; + '') + ]; + }; +} -- cgit v1.2.3 From 46e818ebbc5446b4215ad9524089d9b2dc91cbd3 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 8 Apr 2016 03:53:34 +0200 Subject: retiolum: don't hardcode routing prefixes --- makefu/2configs/nginx/euer.blog.nix | 4 ++-- makefu/2configs/nginx/euer.test.nix | 4 ++-- makefu/2configs/nginx/euer.wiki.nix | 4 ++-- makefu/2configs/nginx/update.connector.one.nix | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'makefu/2configs/nginx') diff --git a/makefu/2configs/nginx/euer.blog.nix b/makefu/2configs/nginx/euer.blog.nix index 9d08f4b9a..137c0b0e3 100644 --- a/makefu/2configs/nginx/euer.blog.nix +++ b/makefu/2configs/nginx/euer.blog.nix @@ -8,8 +8,8 @@ let hostname = config.krebs.build.host.name; user = config.services.nginx.user; group = config.services.nginx.group; - external-ip = head config.krebs.build.host.nets.internet.addrs4; - internal-ip = head config.krebs.build.host.nets.retiolum.addrs4; + external-ip = config.krebs.build.host.nets.internet.ip4.addr; + internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr; base-dir = "/var/www/blog.euer"; in { # Prepare Blog directory diff --git a/makefu/2configs/nginx/euer.test.nix b/makefu/2configs/nginx/euer.test.nix index f7214e613..84b9bacda 100644 --- a/makefu/2configs/nginx/euer.test.nix +++ b/makefu/2configs/nginx/euer.test.nix @@ -5,8 +5,8 @@ let hostname = config.krebs.build.host.name; user = config.services.nginx.user; group = config.services.nginx.group; - external-ip = head config.krebs.build.host.nets.internet.addrs4; - internal-ip = head config.krebs.build.host.nets.retiolum.addrs4; + external-ip = config.krebs.build.host.nets.internet.ip4.addr; + internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr; in { krebs.nginx = { enable = mkDefault true; diff --git a/makefu/2configs/nginx/euer.wiki.nix b/makefu/2configs/nginx/euer.wiki.nix index a5572a519..10985c833 100644 --- a/makefu/2configs/nginx/euer.wiki.nix +++ b/makefu/2configs/nginx/euer.wiki.nix @@ -18,8 +18,8 @@ let # user1 = pass1 # userN = passN tw-pass-file = "${sec}/tw-pass.ini"; - external-ip = head config.krebs.build.host.nets.internet.addrs4; - internal-ip = head config.krebs.build.host.nets.retiolum.addrs4; + external-ip = config.krebs.build.host.nets.internet.ip4.addr; + internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr; in { services.phpfpm = { # phpfpm does not have an enable option diff --git a/makefu/2configs/nginx/update.connector.one.nix b/makefu/2configs/nginx/update.connector.one.nix index ac5e6b17b..dde3e3a64 100644 --- a/makefu/2configs/nginx/update.connector.one.nix +++ b/makefu/2configs/nginx/update.connector.one.nix @@ -3,7 +3,7 @@ with config.krebs.lib; let hostname = config.krebs.build.host.name; - external-ip = head config.krebs.build.host.nets.internet.addrs4; + external-ip = config.krebs.build.host.nets.internet.ip4.addr; in { krebs.nginx = { enable = mkDefault true; -- cgit v1.2.3