diff options
author | Vika <vika@fireburn.ru> | 2021-08-04 13:45:45 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2021-08-04 13:45:45 +0300 |
commit | c081d65fcea1b4fcf3688d3ab752f62c20c87169 (patch) | |
tree | ac7cc4db3262d2f7454aad739c7bcd3705608663 | |
parent | b88d8508cf3c0ccf1746795e7c04a173e6e0d0e4 (diff) | |
download | kittybox-c081d65fcea1b4fcf3688d3ab752f62c20c87169.tar.zst |
Turns out nulls are evil
-rw-r--r-- | flake.nix | 8 |
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 ''; |