Nix (command): Difference between revisions
imported>SabryTarek mNo edit summary |
imported>Samuela No edit summary |
||
| Line 4: | Line 4: | ||
== Enabling the nix command == | == Enabling the nix command == | ||
In nix 2.4 the nix command must be enabled explicitly set | In nix 2.4 the nix command must be enabled explicitly set. You can do this in a few different ways. | ||
For an individual invocation, eg. | |||
<syntaxHighlight> | |||
nix --experimental-features nix-command log ... | |||
</syntaxHighlight> | |||
Or by setting a user-specific configuration, | |||
<syntaxHighlight lang=toml> | |||
# ~/.config/nix/nix.conf | |||
experimental-features = nix-command | |||
</syntaxHighlight> | |||
in <code>~/.config/nix/nix.conf</code>. | |||
Or system-wide with | |||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
# /etc/nix/nix.conf | |||
{ pkgs, ... }: { | { pkgs, ... }: { | ||
nix.extraOptions = '' | nix.extraOptions = '' | ||
| Line 17: | Line 29: | ||
} | } | ||
</syntaxHighlight> | </syntaxHighlight> | ||
in <code>/etc/nix/nix.conf</code> on NixOS. | |||
In the following we describe all sub commands of nix: | In the following we describe all sub commands of nix: | ||