Forrest logo
back to the nix tool

nix3-profile:tldr:e3771

nix3-profile: Install a package from a flake on GitHub into a custom profile.
$ nix profile install ${github:owner-repo-pkg} --profile ${--path-to-directory}
try on your machine

This command is using the Nix package manager to install a specific package from GitHub into a specified profile directory.

Let's break down the command:

  • nix profile install: This is the command to install a package into a Nix profile directory.
  • ${github:owner-repo-pkg}: This is a placeholder syntax to specify a package from GitHub. owner-repo-pkg should be replaced with the actual GitHub repository name in the format owner/repo/pkg. For example, nix profile install github:JohnDoe/my-package would install the package my-package from the GitHub repository owned by JohnDoe.
  • --profile ${--path-to-directory}: This specifies the directory where the package will be installed. --path-to-directory should be replaced with the actual path to the desired profile directory. For example, --profile /nix/var/nix/profiles/my-profile would install the package into the my-profile directory.

So overall, the command installs a specific package from GitHub into a specified Nix profile directory.

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 tool