summaryrefslogtreecommitdiff
path: root/sys/web/nginx.nix
diff options
context:
space:
mode:
Diffstat (limited to 'sys/web/nginx.nix')
-rw-r--r--sys/web/nginx.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/web/nginx.nix b/sys/web/nginx.nix
index ba1f430..ab5ccde 100644
--- a/sys/web/nginx.nix
+++ b/sys/web/nginx.nix
@@ -7,6 +7,10 @@ in
options.local.web = {
enable = mkEnableOption "web server";
+ defaultACMEHost = mkOption {
+ type = types.str;
+ };
+
ownedCerts = mkOption {
type = with lib.types; listOf str;
default = [ ];
@@ -46,7 +50,16 @@ in
sslDhparam = config.security.dhparams.params.nginx.path;
clientMaxBodySize = "42M";
- virtualHosts = { };
+ virtualHosts.default = {
+ default = true;
+
+ addSSL = true;
+ useACMEHost = cfg.defaultACMEHost;
+
+ extraConfig = ''
+ return 403;
+ '';
+ };
};
};