From dd4b7f6bd8ea2afcf50630048622f6efe67d653e Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 26 Aug 2023 12:22:15 +0200 Subject: add nixusage script --- nixusage | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 nixusage diff --git a/nixusage b/nixusage new file mode 100755 index 0000000..eb9d7ef --- /dev/null +++ b/nixusage @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +for link in $(find -H /nix/var/nix/gcroots -type l); do + ref=$(realpath $link) + sizeinfo=$(nix path-info -rS $ref | sort -nk2 | tail -n 1) + echo "$link $sizeinfo" +done | sort -nk3 -- cgit v1.2.3