Terms and Definitions in Nix Project: Difference between revisions

Jopejoe1 (talk | contribs)
m Remove Withe space
Sdht0 (talk | contribs)
Copy edit
Line 14: Line 14:
|| <div id="user_environment"></div>[[User Environment]]
|| <div id="user_environment"></div>[[User Environment]]
|| Nix
|| Nix
|| A set of "active" applications. These applications usually exist in the Nix store. A single Nix user may have multiple User Environments. This is an important concept further explored in [[User Environment]]. ''Profiles'' and ''generations'' are closely related.
|| A set of "active" applications. These applications usually exist in the Nix store. A single Nix user may have multiple ''user environments''. ''Profiles'' and ''generations'' are closely related.
|| {{Nix Manual|name=Nix Manual - Basic Package Management chapter|anchor=#ch-basic-package-mgmt}} <br>{{Nix Manual|name=Nix Manual - Profiles chapter|anchor=#sec-profiles}} <br>{{Nix Manual|name=Nix Manual - nix-env|anchor=#sec-nix-env}}
|| {{Nix Manual|name=Nix Manual - Basic Package Management chapter|anchor=#ch-basic-package-mgmt}} <br>{{Nix Manual|name=Nix Manual - Profiles chapter|anchor=#sec-profiles}} <br>{{Nix Manual|name=Nix Manual - nix-env|anchor=#sec-nix-env}}
|--------
|--------
|| (User) Profile
|| (User) Profile
|| Nix
|| Nix
|| Profiles simplify managing and switching between ''user environments'' (and thus, control which applications and system configurations are used). Most generally, a ''profile'' is a link to a ''generation'', and there's a '''profiles''' (note the '''s''') folder which collects types of profiles together so that they form lists of generations. In standalone Nix (e.g. on a different Linux distro), its primary use is user profiles. In NixOS, there is also the ''system'' profile, which manages system-wide configuration (e.g. ''/etc'', the kernel, ''initrd'', ''systemd''). Tools like [[Home Manager]] also have their own profile (which would also be per-user). The user's ''active profile'' is defined in ''~/.nix-profile'', and is what all '''nix-env''' commands would operate on by default.<syntaxHighlight lang=shell>
|| Profiles simplify managing and switching between ''user environments'', and thus control which applications and system configurations are in active use. Generally, a ''profile'' is a link to a ''generation'', and the corresponding '''profiles''' folder collects a list of generations. A standalone Nix installation (i.e. on a Linux distro that is not NixOS) operates mainly on ''user'' profiles. In NixOS, there is also a ''system'' profile that manages system-wide configuration (e.g. ''/etc'', the kernel, ''initrd'', ''systemd''). Other tools like [[Home Manager]] also have their own profiles. By default, a user's active profile is stored at ''~/.nix-profile'':
ls -l ~/.nix-profile
<syntaxHighlight lang=shell>
$ ls -l ~/.nix-profile
lrwxrwxrwx ... /home/username/.nix-profile ->
lrwxrwxrwx ... /home/username/.nix-profile ->
/nix/var/nix/profiles/per-user/username/profile</syntaxHighlight>
/nix/var/nix/profiles/per-user/username/profile
</syntaxHighlight>
|| [http://nixos.org/nix/manual/#sec-profiles Nix Manual: Profiles]<br>[https://nixos.org/guides/nix-pills/install-on-your-running-system.html#idm140737320787760 Nix Pills - The first profile]
|| [http://nixos.org/nix/manual/#sec-profiles Nix Manual: Profiles]<br>[https://nixos.org/guides/nix-pills/install-on-your-running-system.html#idm140737320787760 Nix Pills - The first profile]
|--------
|--------