Home Explore Blog CI



nix

1st chunk of `src/nix/profile-add.md`
ef41550f3e1fa50e2a4c8a94a42073e40556bdd8dafa03e2000000010000027d
R""(

# Examples

- Add a package from Nixpkgs:

  ```console
  # nix profile add nixpkgs#hello
  ```

- Add a package from a specific branch of Nixpkgs:

  ```console
  # nix profile add nixpkgs/release-20.09#hello
  ```

- Add a package from a specific revision of Nixpkgs:

  ```console
  # nix profile add nixpkgs/d73407e8e6002646acfdef0e39ace088bacc83da#hello
  ```

- Add a specific output of a package:

  ```console
  # nix profile add nixpkgs#bash^man
  ```

# Description

This command adds [_installables_](./nix.md#installables) to a Nix profile.

> **Note**
>
> `nix profile install` is an alias for `nix profile add`.

)""

Title: Adding Packages to a Nix Profile
Summary
The `nix profile add` command (also aliased as `nix profile install`) is used to add installables to a Nix profile. The examples demonstrate how to add packages from Nixpkgs, specifying branches, revisions, or specific outputs.