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.
This commit is contained in:
parent
61276c8099
commit
5e43c70867
1 changed files with 5 additions and 8 deletions
|
@ -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 ];
|
||||
|
|
Loading…
Reference in a new issue