Flakes: Difference between revisions

imported>Srid
Enable flakes: determinate installer
imported>Mickours
Add Nix profile tips and tricks
Line 247: Line 247:


The {{ic|nix flake}} subcommand is described in [https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html command reference page of the unstable manual].
The {{ic|nix flake}} subcommand is described in [https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html command reference page of the unstable manual].
== 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 :
<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 ==