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

@ -583,6 +583,12 @@ in
config = mkIf config.services.httpd.enable { 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 users.extraUsers = optionalAttrs (mainCfg.user == "wwwrun") singleton
{ name = "wwwrun"; { name = "wwwrun";
group = "wwwrun"; group = "wwwrun";