mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge pull request #1178 from chexxor/fix-httpd-ssh
HTTPD: Check for SSL Cert value before building with SSL support.
This commit is contained in:
commit
4ccd60af00
1 changed files with 7 additions and 1 deletions
|
@ -260,7 +260,7 @@ let
|
|||
|
||||
'' else ""}
|
||||
|
||||
${if cfg.globalRedirect != null then ''
|
||||
${if cfg.globalRedirect != null && cfg.globalRedirect != "" then ''
|
||||
RedirectPermanent / ${cfg.globalRedirect}
|
||||
'' else ""}
|
||||
|
||||
|
@ -582,6 +582,12 @@ in
|
|||
###### implementation
|
||||
|
||||
config = mkIf config.services.httpd.enable {
|
||||
|
||||
assertions = [ { assertion = mainCfg.enableSSL == true
|
||||
-> mainCfg.sslServerCert != null
|
||||
&& mainCfg.sslServerKey != null;
|
||||
message = "SSL is enabled for HTTPD, but sslServerCert and/or sslServerKey haven't been specified."; }
|
||||
];
|
||||
|
||||
users.extraUsers = optionalAttrs (mainCfg.user == "wwwrun") singleton
|
||||
{ name = "wwwrun";
|
||||
|
|
Loading…
Reference in a new issue