Flakes: Difference between revisions

imported>Deemp
m Added a link to the flakes on NixOS section
imported>Artturin
Link to manual
Line 262: Line 262:
== Install packages with `nix profile` ==
== Install packages with `nix profile` ==


You can install Nix packages into your local profile from any flakes with `nix profile install. For example from `nixpkgs`` flake :
[https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-profile-install.html <code>nix profile install</code> in the manual]
<syntaxHighlight lang=bash>
nix profile install nixpkgs#hello
</syntaxHighlight>
 
On NixOS you can syncronize your system and your profile references to `nixpkgs` with:
<syntaxHighlight lang=bash>
nix registry pin nixpkgs github:NixOS/nixpkgs/$(nixos-version --revision)
</syntaxHighlight>


== Using nix flakes with NixOS ==
== Using nix flakes with NixOS ==