about summary refs log tree commit diff
path: root/nixos/modules/services/web-apps
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2017-04-11 18:08:51 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2017-04-11 18:18:53 +0200
commit3ab45f4b369c9c741b55ddedeaac4c797dc61c04 (patch)
tree3c5e330622e42066e50ab20a6c58b9251addf863 /nixos/modules/services/web-apps
parent54fff9ec1a9e7425926eadffada0268351536926 (diff)
downloadnixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.tar
nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.tar.gz
nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.tar.bz2
nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.tar.lz
nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.tar.xz
nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.tar.zst
nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.zip
treewide: use boolToString function
Diffstat (limited to 'nixos/modules/services/web-apps')
-rw-r--r--nixos/modules/services/web-apps/atlassian/crowd.nix2
-rw-r--r--nixos/modules/services/web-apps/quassel-webserver.nix4
-rw-r--r--nixos/modules/services/web-apps/tt-rss.nix2
3 files changed, 3 insertions, 5 deletions
diff --git a/nixos/modules/services/web-apps/atlassian/crowd.nix b/nixos/modules/services/web-apps/atlassian/crowd.nix
index ce41aa4f1e18..b54c91d7de92 100644
--- a/nixos/modules/services/web-apps/atlassian/crowd.nix
+++ b/nixos/modules/services/web-apps/atlassian/crowd.nix
@@ -137,7 +137,7 @@ in
 
         sed -e 's,port="8095",port="${toString cfg.listenPort}" address="${cfg.listenAddress}",' \
         '' + (lib.optionalString cfg.proxy.enable ''
-          -e 's,compression="on",compression="off" protocol="HTTP/1.1" proxyName="${cfg.proxy.name}" proxyPort="${toString cfg.proxy.port}" scheme="${cfg.proxy.scheme}" secure="${if cfg.proxy.secure then "true" else "false"}",' \
+          -e 's,compression="on",compression="off" protocol="HTTP/1.1" proxyName="${cfg.proxy.name}" proxyPort="${toString cfg.proxy.port}" scheme="${cfg.proxy.scheme}" secure="${boolToString cfg.proxy.secure}",' \
         '') + ''
           ${pkg}/apache-tomcat/conf/server.xml.dist > ${cfg.home}/server.xml
       '';
diff --git a/nixos/modules/services/web-apps/quassel-webserver.nix b/nixos/modules/services/web-apps/quassel-webserver.nix
index d19e4bc58277..2ba5698d6cb1 100644
--- a/nixos/modules/services/web-apps/quassel-webserver.nix
+++ b/nixos/modules/services/web-apps/quassel-webserver.nix
@@ -12,11 +12,11 @@ let
         port: ${toString cfg.quasselCorePort},  // quasselcore port
         initialBacklogLimit: ${toString cfg.initialBacklogLimit},  // Amount of backlogs to fetch per buffer on connection
         backlogLimit: ${toString cfg.backlogLimit},  // Amount of backlogs to fetch per buffer after first retrieval
-        securecore: ${if cfg.secureCore then "true" else "false"},  // Connect to the core using SSL
+        securecore: ${boolToString cfg.secureCore},  // Connect to the core using SSL
         theme: '${cfg.theme}'  // Default UI theme
       },
       themes: ['default', 'darksolarized'],  //  Available themes
-      forcedefault: ${if cfg.forceHostAndPort then "true" else "false"},  // Will force default host and port to be used, and will hide the corresponding fields in the UI
+      forcedefault: ${boolToString cfg.forceHostAndPort},  // Will force default host and port to be used, and will hide the corresponding fields in the UI
       prefixpath: '${cfg.prefixPath}'  // Configure this if you use a reverse proxy
     };
   '';
diff --git a/nixos/modules/services/web-apps/tt-rss.nix b/nixos/modules/services/web-apps/tt-rss.nix
index 5193814da725..76b0ee6da968 100644
--- a/nixos/modules/services/web-apps/tt-rss.nix
+++ b/nixos/modules/services/web-apps/tt-rss.nix
@@ -6,8 +6,6 @@ let
 
   configVersion = 26;
 
-  boolToString = b: if b then "true" else "false";
-
   cacheDir = "cache";
   lockDir = "lock";
   feedIconsDir = "feed-icons";