nixos/paperless: use toShellVars for paperless-manage
The homebrewed snippet didn't escape vars properly which is an issue because PAPERLESS_OCR_USER_ARGS requires a JSON string. This also meant a discrepancy between the services' env vars and paperless-manage's. Just use the correctly functioning library function for this instead.
This commit is contained in:
parent
78419edadf
commit
44f637aa8d
|
@ -26,12 +26,9 @@ let
|
|||
lib.mapAttrs (_: toString) cfg.extraConfig
|
||||
);
|
||||
|
||||
manage =
|
||||
let
|
||||
setupEnv = lib.concatStringsSep "\n" (mapAttrsToList (name: val: "export ${name}=\"${val}\"") env);
|
||||
in
|
||||
pkgs.writeShellScript "manage" ''
|
||||
${setupEnv}
|
||||
manage = pkgs.writeShellScript "manage" ''
|
||||
set -o allexport # Export the following env vars
|
||||
${lib.toShellVars env}
|
||||
exec ${pkg}/bin/paperless-ngx "$@"
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue