diff --git a/overlays/show-files-to-be-deleted/default.nix b/overlays/show-files-to-be-deleted/default.nix index 7f70a0c..a461e36 100644 --- a/overlays/show-files-to-be-deleted/default.nix +++ b/overlays/show-files-to-be-deleted/default.nix @@ -3,8 +3,14 @@ flake.overlays.show-files-to-be-deleted = final: prev: { show-files-to-be-deleted = final.writeShellScriptBin "show-files-to-be-deleted" '' - [ $(id -u) == 0 ] || exec sudo $0 - find / -mount -type f + if [[ "$#" != "1" ]] ; then + echo "Invalid number ($#) of argumets, one expected." + exit 1 + fi + + _mount_point="$1" + + find "$1" -mount -type f ''; }; }