summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnixusage7
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