diff options
author | Alex Berg <chexxor@gmail.com> | 2013-11-06 09:32:22 +0800 |
---|---|---|
committer | Alex Berg <chexxor@gmail.com> | 2013-11-06 11:20:14 +0800 |
commit | 0427e7fbf236ca20e9311399dd3e7d369e6a99c6 (patch) | |
tree | aef0718cb3064e0329d07595eb363319fbab4cc0 /nixos/modules/services/web-servers/apache-httpd/default.nix | |
parent | 9817bada91cb5b69ecaa8cf3ae393cc50a289881 (diff) | |
download | nixlib-0427e7fbf236ca20e9311399dd3e7d369e6a99c6.tar nixlib-0427e7fbf236ca20e9311399dd3e7d369e6a99c6.tar.gz nixlib-0427e7fbf236ca20e9311399dd3e7d369e6a99c6.tar.bz2 nixlib-0427e7fbf236ca20e9311399dd3e7d369e6a99c6.tar.lz nixlib-0427e7fbf236ca20e9311399dd3e7d369e6a99c6.tar.xz nixlib-0427e7fbf236ca20e9311399dd3e7d369e6a99c6.tar.zst nixlib-0427e7fbf236ca20e9311399dd3e7d369e6a99c6.zip |
Check for SSL Cert value before building with SSL support.
Diffstat (limited to 'nixos/modules/services/web-servers/apache-httpd/default.nix')
-rw-r--r-- | nixos/modules/services/web-servers/apache-httpd/default.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index d21b6da0e772..e94af76661d1 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -582,6 +582,12 @@ in ###### implementation config = mkIf config.services.httpd.enable { + + assertions = [ { assertion = mainCfg.enableSSL == true + -> mainCfg.sslServerCert != null && mainCfg.sslServerCert != "" + && mainCfg.sslServerKey != null && mainCfg.sslServerKey != ""; + message = "SSL is enabled for HTTPD, but sslServerCert and/or sslServerKey haven't been specified."; } + ]; users.extraUsers = optionalAttrs (mainCfg.user == "wwwrun") singleton { name = "wwwrun"; |