summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/nginx.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-10-19 20:40:27 +0200
committermakefu <github@syntax-fehler.de>2015-10-19 20:40:27 +0200
commitaed6c87e7ac4fb46f4029208d8938ba0fa869491 (patch)
tree177dffd829d2668bcbafee29f3bc72f15930f35a /krebs/3modules/nginx.nix
parent952c03b3742cc1a979e4a1c148d083f1334cfe65 (diff)
parent222ca361e38b09ddef563abaaacd114ec86e2a5c (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs/3modules/nginx.nix')
-rw-r--r--krebs/3modules/nginx.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/krebs/3modules/nginx.nix b/krebs/3modules/nginx.nix
index 702e8a7f6..65f3b238e 100644
--- a/krebs/3modules/nginx.nix
+++ b/krebs/3modules/nginx.nix
@@ -24,9 +24,17 @@ let
"${config.networking.hostName}.retiolum"
];
};
+ port = mkOption {
+ type = with types; int;
+ default = 80;
+ };
locations = mkOption {
type = with types; listOf (attrsOf str);
};
+ extraConfig = mkOption {
+ type = with types; str;
+ default = "";
+ };
};
default = {};
};
@@ -60,10 +68,11 @@ let
}
'';
- to-server = { server-names, locations, ... }: ''
+ to-server = { server-names, port, locations, extraConfig, ... }: ''
server {
- listen 80;
+ listen ${toString port};
server_name ${toString server-names};
+ ${extraConfig}
${indent (concatStrings (map to-location locations))}
}
'';