From d38853027efe650e6de4b335014cd238624cd993 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 13 Feb 2016 16:07:01 +0100 Subject: krebs.nginx: default locations = [] --- krebs/3modules/nginx.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'krebs/3modules/nginx.nix') diff --git a/krebs/3modules/nginx.nix b/krebs/3modules/nginx.nix index 92177103..5bc0903e 100644 --- a/krebs/3modules/nginx.nix +++ b/krebs/3modules/nginx.nix @@ -34,6 +34,7 @@ let }; locations = mkOption { type = with types; listOf (attrsOf str); + default = []; }; extraConfig = mkOption { type = with types; string; @@ -76,8 +77,8 @@ let server { ${concatMapStringsSep "\n" (x: "listen ${x};") listen} server_name ${toString server-names}; - ${extraConfig} - ${indent (concatStrings (map to-location locations))} + ${indent extraConfig} + ${indent (concatMapStrings to-location locations)} } ''; -- cgit v1.2.3 From 673853e092c211e26a08030f87f9c868c6442a71 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 14 Feb 2016 16:43:44 +0100 Subject: RIP specialArgs.lib --- krebs/3modules/nginx.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'krebs/3modules/nginx.nix') diff --git a/krebs/3modules/nginx.nix b/krebs/3modules/nginx.nix index 5bc0903e..7b716307 100644 --- a/krebs/3modules/nginx.nix +++ b/krebs/3modules/nginx.nix @@ -1,13 +1,12 @@ -{ config, pkgs, lib, ... }: +{ config, lib, pkgs, ... }: -with builtins; -with lib; +with config.krebs.lib; let cfg = config.krebs.nginx; out = { options.krebs.nginx = api; - config = mkIf cfg.enable imp; + config = lib.mkIf cfg.enable imp; }; api = { -- cgit v1.2.3