about summary refs log tree commit diff stats
path: root/scripts/why-depends
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-11-30 16:16:59 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-11-30 16:16:59 +0100
commit191b13a95500ae8a023ac816e7ff0319b3796a9c (patch)
tree4cbc75738a86abc43fd1c2add0c3baa17dee2330 /scripts/why-depends
parentmodules/{common,steam,nixpkgs}: Disable Steam (diff)
downloadnixos-config-191b13a95500ae8a023ac816e7ff0319b3796a9c.zip
scripts/why-depends: Init
Diffstat (limited to '')
-rwxr-xr-xscripts/why-depends14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/why-depends b/scripts/why-depends
new file mode 100755
index 00000000..59f8d25b
--- /dev/null
+++ b/scripts/why-depends
@@ -0,0 +1,14 @@
+#! /usr/bin/env sh
+
+package="$1"
+version="$2"
+shift 2
+
+host="$(hostname)"
+
+fd "$package-$version" /nix/store --type directory | while read -r dir; do
+    nix why-depends "$@" ".#nixosConfigurations.$host.config.system.build.toplevel" "$dir"
+done
+
+
+# vim: ft=sh