git.iko.soy/typeable/nixpkgs
on master help sign in
remove all instances of nix-env -i without -A in the NixOS manual

motivation: https://nixos.wiki/wiki/FAQ/Why_not_use_nix-env_-i_foo%3F

commitc3e1e64e4c54ffa06d12be2c499c0acdfd9faf92 authorSymphorien Gibol <symphorien+git@xlumurb.eu> dateThu 15 Aug 2019, 10:09 (7 years ago) parent7a6c6ac
2 files changed+4−4
nixos/doc/manual/installation/installing.xml+3−3 nixos/modules/services/editors/emacs.xml+1−1
nixos/doc/manual/installation/installing.xml+3−3
@@ -335,7 +335,7 @@
335335 If you’re using the graphical ISO image, other editors may be available
336336 (such as <command>vim</command>). If you have network access, you can also
337337 install other editors — for instance, you can install Emacs by running
338− <literal>nix-env -i emacs</literal>.
338+ <literal>nix-env -f '&lt;nixpkgs&gt;' -iA emacs</literal>.
339339 </para>
340340 <variablelist>
341341 <varlistentry>
@@ -467,10 +467,10 @@ Retype new UNIX password: ***</screen>
467467 <para>
468468 You may also want to install some software. For instance,
469469<screen>
470−<prompt>$ </prompt>nix-env -qa \*</screen>
470+<prompt>$ </prompt>nix-env -qaP \*</screen>
471471 shows what packages are available, and
472472<screen>
473−<prompt>$ </prompt>nix-env -i w3m</screen>
473+<prompt>$ </prompt>nix-env -f '&lt;nixpkgs&gt;' -iA w3m</screen>
474474 install the <literal>w3m</literal> browser.
475475 </para>
476476 </listitem>
nixos/modules/services/editors/emacs.xml+1−1
@@ -552,7 +552,7 @@ emacsclient --create-frame --tty # opens a new frame on the current terminal
552552 <xref linkend="opt-environment.systemPackages"/>
553553 (<link
554554 linkend="sec-declarative-package-mgmt">NixOS</link>), or run
555− <literal>nix-env -i pkgs.docbook5</literal>
555+ <literal>nix-env -f '&lt;nixpkgs&gt;' -iA docbook5</literal>
556556 (<link linkend="sec-ad-hoc-packages">Nix</link>).
557557 </para>
558558