about summary refs log tree commit diff
path: root/configs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2019-03-07T16·47+0000
committerWilliam Carroll <wpcarro@gmail.com>2019-03-07T16·47+0000
commit94bbcaafd5fd4a756fe0c0998a1456b50872aa2e (patch)
tree3bb1904cc937b0d294397cff1525f6ed9e09c047 /configs
parentaa7b96bacd8c6e0bef0493697a75474754fda96a (diff)
Define nix_installed function
Lists the packages installed by `nix-env`. Moving forward, it might be
useful to run something like...

`$ nix_installed >nix-env.txt`

...and commit that to this repository a la the brew.txt file that
previously floated around this repo. For now, I'm unwilling to commit to
that solution, because I'm hoping a better alternative exists.

Perhaps this should be an alias. Still unsure why I write aliases
sometimes and functions other times. It might be worth documenting as a
principle that I can lean on.
Diffstat (limited to 'configs')
-rw-r--r--configs/shared/zsh/dumping_grounds.zsh5
1 files changed, 5 insertions, 0 deletions
diff --git a/configs/shared/zsh/dumping_grounds.zsh b/configs/shared/zsh/dumping_grounds.zsh
index bd98877e6ae5..c2acc64564af 100644
--- a/configs/shared/zsh/dumping_grounds.zsh
+++ b/configs/shared/zsh/dumping_grounds.zsh
@@ -129,6 +129,11 @@ path() {
   echo "$PATH" | tr : '\n'
 }
 
+nix_installed() {
+  # Lists the packages installed with `nix-env`
+  nix-env -q
+}
+
 nix_store() {
   # Print the packages in /nix/store without the preceding hash
   ls /nix/store | sed 's/[a-z0-9]*-//'