about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--flake.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/flake.nix b/flake.nix
index b8ba086..2e3f40d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -138,9 +138,11 @@
           };
 
           script = ''
-            if [[ -f ${cfg.internalTokenFile} ]]; then
-              export KITTYBOX_INTERNAL_TOKEN=$(${pkgs.coreutils}/bin/cat ${cfg.internalTokenFile})
-            fi
+            ${lib.optionalString (cfg.internalTokenFile != null) ''
+              if [[ -f ${cfg.internalTokenFile} ]]; then
+                export KITTYBOX_INTERNAL_TOKEN=$(${pkgs.coreutils}/bin/cat ${cfg.internalTokenFile})
+              fi
+            ''}
             exec ${cfg.package}/bin/kittybox
           '';