diff options
author | Alex Auvolat <alex@adnab.me> | 2023-08-26 12:22:15 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-08-26 12:22:21 +0200 |
commit | dd4b7f6bd8ea2afcf50630048622f6efe67d653e (patch) | |
tree | 3669b9d03309a076a94d95328d232d34472850f0 /nixusage | |
parent | a8dcc5daa0565cfcaf19895dbd9bcf7f1b5cd1c1 (diff) | |
download | user-config-dd4b7f6bd8ea2afcf50630048622f6efe67d653e.tar.gz user-config-dd4b7f6bd8ea2afcf50630048622f6efe67d653e.zip |
add nixusage script
Diffstat (limited to 'nixusage')
-rwxr-xr-x | nixusage | 7 |
1 files changed, 7 insertions, 0 deletions
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 |