diff options
author | lassulus <lass@lassul.us> | 2016-12-26 14:18:08 +0100 |
---|---|---|
committer | lassulus <lass@lassul.us> | 2016-12-26 14:18:08 +0100 |
commit | b9e3b93105d4214de43ee596adff7cf661311780 (patch) | |
tree | abff4b7c7ca29266c787fc37dc7f6bef2bd2ce26 /lass/1systems | |
parent | 0f34276090f804b7eed2bf45a0804a69fbe8ae35 (diff) |
l: krebs.nginx -> services.nginx
Diffstat (limited to 'lass/1systems')
-rw-r--r-- | lass/1systems/mors.nix | 14 | ||||
-rw-r--r-- | lass/1systems/prism.nix | 23 |
2 files changed, 15 insertions, 22 deletions
diff --git a/lass/1systems/mors.nix b/lass/1systems/mors.nix index 4553cc15b..dcdb57f3b 100644 --- a/lass/1systems/mors.nix +++ b/lass/1systems/mors.nix @@ -66,20 +66,18 @@ with import <stockholm/lib>; }; } { - krebs.nginx = { + services.nginx = { enable = true; - servers.default = { - server-names = [ + virtualHosts.default = { + serverAliases = [ "localhost" "${config.krebs.build.host.name}" "${config.krebs.build.host.name}.r" "${config.krebs.build.host.name}.retiolum" ]; - locations = [ - (nameValuePair "~ ^/~(.+?)(/.*)?\$" '' - alias /home/$1/public_html$2; - '') - ]; + locations."~ ^/~(.+?)(/.*)?\$".extraConfig = '' + alias /home/$1/public_html$2; + ''; }; }; } diff --git a/lass/1systems/prism.nix b/lass/1systems/prism.nix index 7646f7163..efe79052f 100644 --- a/lass/1systems/prism.nix +++ b/lass/1systems/prism.nix @@ -179,11 +179,9 @@ in { imports = [ ../2configs/realwallpaper.nix ]; - krebs.nginx.servers."lassul.us".locations = [ - (lib.nameValuePair "/wallpaper.png" '' - alias /tmp/wallpaper.png; - '') - ]; + services.nginx.virtualHosts."lassul.us".locations."/wallpaper.png".extraConfig = '' + alias /tmp/wallpaper.png; + ''; } { environment.systemPackages = with pkgs; [ @@ -203,16 +201,13 @@ in { }; } { - krebs.nginx = { + services.nginx = { enable = true; - servers.public = { - listen = [ "8088" ]; - server-names = [ "default" ]; - locations = [ - (nameValuePair "~ ^/~(.+?)(/.*)?\$" '' - alias /home/$1/public_html$2; - '') - ]; + virtualHosts.public = { + port = 8088; + locations."~ ^/~(.+?)(/.*)?\$".extraConfig = '' + alias /home/$1/public_html$2; + ''; }; }; krebs.iptables.tables.filter.INPUT.rules = [ |