tree-wide: format with nixfmt

Another saturday another useless formatter change.
It's my dotfiles, after all

alejandra doesn't handle c-style inline comments well.
This commit is contained in:
Primrose 2025-11-08 10:15:58 +08:00
parent ec704b5272
commit ebf8468807
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
116 changed files with 1895 additions and 1689 deletions

View file

@ -2,26 +2,27 @@
writeShellApplication,
which,
lib,
}: let
}:
let
# Use this to not pollute the PATH inside
# Otherwise nix-which which will be an edge case
whichExe = "${lib.getExe which}";
in
writeShellApplication {
name = "nix-which";
text = ''
if [ "$#" -ne 1 ]; then
echo "Must provide exactly one argument, the package to be dereferenced"
exit 1
fi
target="$1"
writeShellApplication {
name = "nix-which";
text = ''
if [ "$#" -ne 1 ]; then
echo "Must provide exactly one argument, the package to be dereferenced"
exit 1
fi
target="$1"
target="$(${whichExe} "$target")"
echo "==> $target"
target="$(${whichExe} "$target")"
echo "==> $target"
while [ -L "$target" ]; do
target="$(readlink "$target")"
echo "==> $target"
done
'';
}
while [ -L "$target" ]; do
target="$(readlink "$target")"
echo "==> $target"
done
'';
}