Forrest logo
back to the nix-env tool

nix-classic:tldr:9915f

nix-classic: Install some packages permanently.
$ nix-env -iA ${nixpkgs-pkg1 nixpkgs-pkg2---}
try on your machine

The command you provided is nix-env -iA ${nixpkgs-pkg1 nixpkgs-pkg2---}. This command is used in the Nix package manager to install packages from the Nixpkgs collection.

To break it down:

  • nix-env is the command-line tool used for managing packages in Nix.
  • -iA is an option that stands for "install a package attribute". It is followed by a package attribute set.
  • ${nixpkgs-pkg1 nixpkgs-pkg2---} is the package attribute set. The ${} syntax is used to specify multiple package attribute names separated by spaces.

So, nix-env -iA ${nixpkgs-pkg1 nixpkgs-pkg2---} installs the packages specified by the attribute names nixpkgs-pkg1, nixpkgs-pkg2, and so on, from the Nixpkgs collection. The actual package names corresponding to these attribute names will be looked up in the Nixpkgs tree, and their dependencies will be resolved and installed if necessary.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the nix-env tool