aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--home/root/common/core/zsh/zshrc19
-rw-r--r--hosts/common/core/default.nix1
-rw-r--r--hosts/common/optional/misc.nix1
3 files changed, 19 insertions, 2 deletions
diff --git a/home/root/common/core/zsh/zshrc b/home/root/common/core/zsh/zshrc
index 5338c6c..a0f7fee 100644
--- a/home/root/common/core/zsh/zshrc
+++ b/home/root/common/core/zsh/zshrc
@@ -29,7 +29,7 @@ bindkey -M vicmd v edit-command-line
#[[ -z "$TMUX" ]] && (tmux -2 new-session -t default \; new-window || tmux -2 new-session -s default)
[[ -z "$TMUX" ]] && (tmux -2 attach -t default || tmux -2 new-session -s default)
-# Nix helper
+# my Nix helpers
function nix-switch-generation {
local gen=${1}
@@ -44,6 +44,23 @@ function nix-switch-generation {
}
+function nix-depends {
+
+ local pkg=${1}
+
+ if [[ -z "${pkg}" ]]; then
+ echo 'you must specify a packange name!' >&2
+ return 1
+ fi
+
+ local host=$(hostname -s)
+
+ cd /etc/nixos
+ nix why-depends .\#nixosConfigurations.${host}.config.system.build.toplevel .\#nixosConfigurations.${host}.pkgs.${pkg} --derivation | cat
+ cd ${OLDPWD}
+
+}
+
# prompt/theme shit
function precmd {
diff --git a/hosts/common/core/default.nix b/hosts/common/core/default.nix
index 1255210..b6e76d5 100644
--- a/hosts/common/core/default.nix
+++ b/hosts/common/core/default.nix
@@ -40,6 +40,7 @@
gzip
iproute2
iputils
+ jq
less
lshw
lsof
diff --git a/hosts/common/optional/misc.nix b/hosts/common/optional/misc.nix
index a6d5e13..62e1fd5 100644
--- a/hosts/common/optional/misc.nix
+++ b/hosts/common/optional/misc.nix
@@ -19,7 +19,6 @@
iotop
ipcalc
iperf
- jq
mutt
poppler_utils
powertop