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