From 94bbcaafd5fd4a756fe0c0998a1456b50872aa2e Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 7 Mar 2019 16:47:14 +0000 Subject: [PATCH] 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. --- configs/shared/zsh/dumping_grounds.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configs/shared/zsh/dumping_grounds.zsh b/configs/shared/zsh/dumping_grounds.zsh index bd98877e6..c2acc6456 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]*-//'