From 5e43c708676c9ca0cb5d4c848ee9f3057e94b815 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 11 Feb 2024 21:21:00 +0000 Subject: [PATCH] nixos/tandoor-recipes: improve manage script This is mirroring the way the manage script is created in the paperless module, which is more robust to special characters. --- nixos/modules/services/misc/tandoor-recipes.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/misc/tandoor-recipes.nix b/nixos/modules/services/misc/tandoor-recipes.nix index 6c51a9bb8555..a8300ecd5233 100644 --- a/nixos/modules/services/misc/tandoor-recipes.nix +++ b/nixos/modules/services/misc/tandoor-recipes.nix @@ -17,14 +17,11 @@ let lib.mapAttrs (_: toString) cfg.extraConfig ); - manage = - let - setupEnv = lib.concatStringsSep "\n" (mapAttrsToList (name: val: "export ${name}=\"${val}\"") env); - in - pkgs.writeShellScript "manage" '' - ${setupEnv} - exec ${pkg}/bin/tandoor-recipes "$@" - ''; + manage = pkgs.writeShellScript "manage" '' + set -o allexport # Export the following env vars + ${lib.toShellVars env} + exec ${pkg}/bin/tandoor-recipes "$@" + ''; in { meta.maintainers = with maintainers; [ ambroisie ];