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.
This commit is contained in:
William Carroll 2019-03-07 16:47:14 +00:00
parent aa7b96bacd
commit 94bbcaafd5

View file

@ -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]*-//'