]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - pkgs/webapps/apache-theme/default.nix
Refactor a bit httpd/webapps configuration:
[perso/Immae/Config/Nix.git] / pkgs / webapps / apache-theme / default.nix
index b679afe583f5b7d8d13b2e3528164011a9966d27..4b5755a83a45895bcdb297ebe723a7884e655915 100644 (file)
@@ -1,10 +1,12 @@
 { theme_root ? null }:
 rec {
   theme = ./theme;
-  apacheConfig = ''
+  apacheConfig = let
+    theme_root' = if isNull theme_root then theme else theme_root;
+  in ''
     <Macro Apaxy %{folder} %{ignored}>
-      Alias /theme ${if isNull theme_root then theme else theme_root}
-      <Directory ${if isNull theme_root then theme else theme_root}>
+      Alias /theme ${theme_root'}
+      <Directory ${theme_root'}>
         Options -Indexes
         AllowOverride None
         Require all granted