summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/nginx.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/3modules/nginx.nix')
-rw-r--r--krebs/3modules/nginx.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/krebs/3modules/nginx.nix b/krebs/3modules/nginx.nix
index 92177103..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 = {
@@ -34,6 +33,7 @@ let
};
locations = mkOption {
type = with types; listOf (attrsOf str);
+ default = [];
};
extraConfig = mkOption {
type = with types; string;
@@ -76,8 +76,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)}
}
'';