Skip to content

Commit

Permalink
change calls to jq to use absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
spikespaz authored and jordanisaacs committed Nov 23, 2022
1 parent dd98c46 commit fc30fc1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions module/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ with lib; let
binName = (builtins.parseDrvName cfg.pkg.name).name;
in "${cfg.pkg}/bin/${binName}";

jq = lib.getExe pkgs.jq;

identities = builtins.concatStringsSep " " (map (path: "-i ${path}") cfg.identityPaths);

createFiles = command: runtimepath: destinations:
Expand Down Expand Up @@ -120,7 +122,7 @@ with lib; let
fi
# Get all changed secrets for cleanup (intersection)
${pkgs.jq}/bin/jq \
${jq} \
--null-input \
--compact-output \
--argfile old "$oldGenFile" \
Expand All @@ -138,9 +140,9 @@ with lib; let
${pkgs.gnused}/bin/sed \
"s/\$UID/$(id -u)/g" |
while IFS=$"\n" read -r c; do
path=$(echo "$c" | jq --raw-output '.path')
symlinks=$(echo "$c" | jq --raw-output '.symlinks[]')
copies=$(echo "$c" | jq --raw-output '.copies[]')
path=$(echo "$c" | ${jq} --raw-output '.path')
symlinks=$(echo "$c" | ${jq} --raw-output '.symlinks[]')
copies=$(echo "$c" | ${jq} --raw-output '.copies[]')
${cleanupSecret "[homeage] "}
done
Expand Down

0 comments on commit fc30fc1

Please sign in to comment.