From 964855f30bcb36869f24cb8474b9a0c44f58a736 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 22 Jun 2015 18:20:25 +0200 Subject: tv: modularize nginx --- modules/wu/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'modules/wu') diff --git a/modules/wu/default.nix b/modules/wu/default.nix index 76e8c6bb..ac11f746 100644 --- a/modules/wu/default.nix +++ b/modules/wu/default.nix @@ -4,6 +4,8 @@ let lib = import ../../lib { lib = pkgs.lib; inherit pkgs; }; inherit (lib) majmin; + + location = pkgs.lib.nameValuePair; # TODO this is also in modules/tv/git/cgit.nix in { @@ -12,7 +14,6 @@ in ../common/nixpkgs.nix ../tv/base.nix ../tv/exim-retiolum.nix - ../tv/nginx.nix ../tv/retiolum.nix ../tv/sanitize.nix ../tv/smartd.nix @@ -33,6 +34,17 @@ in ]; }; } + { + imports = [ ../tv/nginx ]; + tv.nginx = { + enable = true; + retiolum-locations = [ + (location "~ ^/~(.+?)(/.*)?\$" '' + alias /home/$1/public_html$2; + '') + ]; + }; + } ]; nix.maxJobs = 8; -- cgit v1.2.3