forked from mirrors/nixpkgs
Check for SSL Cert value before building with SSL support.
This commit is contained in:
parent
9817bada91
commit
0427e7fbf2
|
@ -582,6 +582,12 @@ in
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
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";
|
||||||
|
|
Loading…
Reference in a new issue