about summary refs log tree commit diff
path: root/nixos/modules/services/web-servers/tomcat.nix
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-04-20 18:01:06 +0000
committerGitHub <noreply@github.com>2023-04-20 18:01:06 +0000
commite4b6ca8521ffe841f0dac52a119cd913f3182e92 (patch)
treea626cec13e3931c2f15c32a1d620f6d44087f659 /nixos/modules/services/web-servers/tomcat.nix
parent69062acc42eb48986df1bf7bf8f591e0d222f431 (diff)
parentec14e43941ac0b49121aa24c49c55eaf89d2f385 (diff)
Merge master into staging-next
Diffstat (limited to 'nixos/modules/services/web-servers/tomcat.nix')
-rw-r--r--nixos/modules/services/web-servers/tomcat.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/services/web-servers/tomcat.nix b/nixos/modules/services/web-servers/tomcat.nix
index d8bfee547c79a..4d2c36287be69 100644
--- a/nixos/modules/services/web-servers/tomcat.nix
+++ b/nixos/modules/services/web-servers/tomcat.nix
@@ -234,11 +234,11 @@ in
           ln -sfn ${tomcat}/conf/$i ${cfg.baseDir}/conf/`basename $i`
         done
 
-        ${if cfg.extraConfigFiles != [] then ''
+        ${optionalString (cfg.extraConfigFiles != []) ''
           for i in ${toString cfg.extraConfigFiles}; do
             ln -sfn $i ${cfg.baseDir}/conf/`basename $i`
           done
-        '' else ""}
+        ''}
 
         # Create a modified catalina.properties file
         # Change all references from CATALINA_HOME to CATALINA_BASE and add support for shared libraries
@@ -345,7 +345,7 @@ in
 
           # Symlink all the given web applications files or paths into the webapps/ directory
           # of this virtual host
-          for i in "${if virtualHost ? webapps then toString virtualHost.webapps else ""}"; do
+          for i in "${optionalString (virtualHost ? webapps) (toString virtualHost.webapps)}"; do
             if [ -f $i ]; then
               # If the given web application is a file, symlink it into the webapps/ directory
               ln -sfn $i ${cfg.baseDir}/virtualhosts/${virtualHost.name}/webapps/`basename $i`