about summary refs log tree commit diff
path: root/nixos/modules/services/web-apps/mastodon.nix
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2023-06-25 11:47:43 +0200
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-06-25 09:11:40 -0300
commit933a41a73fe2174b90cabb7d671ee2cc5658701a (patch)
tree1f8228d1369ab51c644a47ab269fb9c638553752 /nixos/modules/services/web-apps/mastodon.nix
parent175e9d1f00c41b49606e4eacbc1bfe396641e90f (diff)
treewide: use optional instead of 'then []'
Diffstat (limited to 'nixos/modules/services/web-apps/mastodon.nix')
-rw-r--r--nixos/modules/services/web-apps/mastodon.nix4
1 files changed, 1 insertions, 3 deletions
diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix
index 2ad6cd6aae194..2aab97438b7d6 100644
--- a/nixos/modules/services/web-apps/mastodon.nix
+++ b/nixos/modules/services/web-apps/mastodon.nix
@@ -91,9 +91,7 @@ let
 
   envFile = pkgs.writeText "mastodon.env" (lib.concatMapStrings (s: s + "\n") (
     (lib.concatLists (lib.mapAttrsToList (name: value:
-      if value != null then [
-        "${name}=\"${toString value}\""
-      ] else []
+      lib.optional (value != null) ''${name}="${toString value}"''
     ) env))));
 
   mastodonTootctl = let