From c081d65fcea1b4fcf3688d3ab752f62c20c87169 Mon Sep 17 00:00:00 2001 From: Vika Date: Wed, 4 Aug 2021 13:45:45 +0300 Subject: Turns out nulls are evil --- flake.nix | 8 +++++--- 1 file 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 ''; -- cgit 1.4.1