3
0
Fork 0
forked from mirrors/nixpkgs

Check for SSL Cert value before building with SSL support.

This commit is contained in:
Alex Berg 2013-11-06 09:32:22 +08:00
parent 9817bada91
commit 0427e7fbf2

View file

@ -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";