diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-06-15 13:46:36 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-06-15 13:46:36 -0700 |
commit | c8e7cc5d04a0e7e4af3813cb8eb03e85bed1acb2 (patch) | |
tree | 4f98cf7f1841d16c3744c8aac6a4ccdf2cc326f3 | |
parent | fbd84b29dd191eea326ea5e6be62cce6c47dedf1 (diff) | |
download | nix-c8e7cc5d04a0e7e4af3813cb8eb03e85bed1acb2.tar nix-c8e7cc5d04a0e7e4af3813cb8eb03e85bed1acb2.tar.gz nix-c8e7cc5d04a0e7e4af3813cb8eb03e85bed1acb2.tar.bz2 nix-c8e7cc5d04a0e7e4af3813cb8eb03e85bed1acb2.tar.lz nix-c8e7cc5d04a0e7e4af3813cb8eb03e85bed1acb2.tar.xz nix-c8e7cc5d04a0e7e4af3813cb8eb03e85bed1acb2.tar.zst nix-c8e7cc5d04a0e7e4af3813cb8eb03e85bed1acb2.zip |
Move jq to core default package and dependency helper
-rw-r--r-- | home/root/common/core/zsh/zshrc | 19 | ||||
-rw-r--r-- | hosts/common/core/default.nix | 1 | ||||
-rw-r--r-- | hosts/common/optional/misc.nix | 1 |
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 |