mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
treewide: use more lib.optionalString
This commit is contained in:
parent
b392d9b827
commit
327b0cff7a
41 changed files with 89 additions and 95 deletions
|
@ -64,7 +64,7 @@ let
|
|||
];
|
||||
|
||||
maybeModuleString = moduleName:
|
||||
if elem moduleName cfg.enableModules then ''"${moduleName}"'' else "";
|
||||
optionalString (elem moduleName cfg.enableModules) ''"${moduleName}"'';
|
||||
|
||||
modulesIncludeString = concatStringsSep ",\n"
|
||||
(filter (x: x != "") (map maybeModuleString allKnownModules));
|
||||
|
@ -106,15 +106,15 @@ let
|
|||
static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )
|
||||
index-file.names = ( "index.html" )
|
||||
|
||||
${if cfg.mod_userdir then ''
|
||||
${optionalString cfg.mod_userdir ''
|
||||
userdir.path = "public_html"
|
||||
'' else ""}
|
||||
''}
|
||||
|
||||
${if cfg.mod_status then ''
|
||||
${optionalString cfg.mod_status ''
|
||||
status.status-url = "/server-status"
|
||||
status.statistics-url = "/server-statistics"
|
||||
status.config-url = "/server-config"
|
||||
'' else ""}
|
||||
''}
|
||||
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue