nixos manual: replace /etc/nixos/nixos which no longer exists with more generic and more
correct /path/to/nixpkgs/nixos
This commit is contained in:
parent
6dcca9e096
commit
9cb699f587
|
@ -250,7 +250,7 @@ let
|
|||
in
|
||||
|
||||
{
|
||||
imports = [ /etc/nixos/nixos/modules/services/scheduling/cron.nix ];
|
||||
imports = [ /path/to/nixpkgs/nixos/modules/services/scheduling/cron.nix ];
|
||||
|
||||
options = {
|
||||
services.locate = {
|
||||
|
@ -307,10 +307,10 @@ in
|
|||
<para>
|
||||
|
||||
<screen>
|
||||
$ nix-build /etc/nixos/nixos -A <replaceable>attr</replaceable></screen>
|
||||
$ nix-build /path/to/nixpkgs/nixos -A <replaceable>attr</replaceable></screen>
|
||||
|
||||
where <replaceable>attr</replaceable> is an attribute in
|
||||
<filename>/etc/nixos/nixos/default.nix</filename>. Attributes of interest include:
|
||||
<filename>/path/to/nixpkgs/nixos/default.nix</filename>. Attributes of interest include:
|
||||
|
||||
<variablelist>
|
||||
|
||||
|
@ -344,7 +344,7 @@ Most parts of NixOS can be built through the <varname>config</varname>
|
|||
attribute set. This attribute set allows you to have a view of the merged
|
||||
option definitions and all its derivations. Important derivations are store
|
||||
inside the option <option>system.build</option> and can be listed with the
|
||||
command <command>nix-instantiate --xml --eval-only /etc/nixos/nixos -A
|
||||
command <command>nix-instantiate --xml --eval-only /path/to/nixpkgs/nixos -A
|
||||
config.system.build</command>
|
||||
</para>
|
||||
|
||||
|
@ -368,8 +368,8 @@ you have to set <envar>NIXOS_CONFIG</envar> before
|
|||
running <command>nix-build</command> to build the ISO.
|
||||
|
||||
<screen>
|
||||
$ export NIXOS_CONFIG=/etc/nixos/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
|
||||
$ nix-build /etc/nixos/nixos -A config.system.build.isoImage</screen>
|
||||
$ export NIXOS_CONFIG=/path/to/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
|
||||
$ nix-build /path/to/nixpkgs/nixos -A config.system.build.isoImage</screen>
|
||||
|
||||
</para>
|
||||
|
||||
|
@ -413,8 +413,8 @@ tedious, so here is a quick way to see if the installer works
|
|||
properly:
|
||||
|
||||
<screen>
|
||||
$ export NIXOS_CONFIG=/etc/nixos/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
|
||||
$ nix-build /etc/nixos/nixos -A config.system.build.nixos-install
|
||||
$ export NIXOS_CONFIG=/path/to/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
|
||||
$ nix-build /path/to/nixpkgs/nixos -A config.system.build.nixos-install
|
||||
$ dd if=/dev/zero of=diskimage seek=2G count=0 bs=1
|
||||
$ yes | mke2fs -j diskimage
|
||||
$ mount -o loop diskimage /mnt
|
||||
|
@ -437,8 +437,8 @@ boot correctly is to use QEMU’s <option>-kernel</option> and
|
|||
<option>-initrd</option> options:
|
||||
|
||||
<screen>
|
||||
$ nix-build /etc/nixos/nixos -A config.system.build.initialRamdisk -o initrd
|
||||
$ nix-build /etc/nixos/nixos -A config.system.build.kernel -o kernel
|
||||
$ nix-build /path/to/nixpkgs/nixos -A config.system.build.initialRamdisk -o initrd
|
||||
$ nix-build /path/to/nixpkgs/nixos -A config.system.build.kernel -o kernel
|
||||
$ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/null
|
||||
</screen>
|
||||
|
||||
|
|
|
@ -120,10 +120,10 @@ Declared by:
|
|||
/mnt/data/nix-sources/nixos/modules/services/hardware/udev.nix
|
||||
|
||||
Defined by:
|
||||
/etc/nixos/nixos/modules/system/boot/kernel.nix
|
||||
/etc/nixos/nixos/modules/hardware/network/rt73.nix
|
||||
/etc/nixos/nixos/modules/hardware/network/intel-3945abg.nix
|
||||
/etc/nixos/nixos/modules/hardware/network/intel-2200bg.nix</screen></para>
|
||||
/path/to/nixpkgs/nixos/modules/system/boot/kernel.nix
|
||||
/path/to/nixpkgs/nixos/modules/hardware/network/rt73.nix
|
||||
/path/to/nixpkgs/nixos/modules/hardware/network/intel-3945abg.nix
|
||||
/path/to/nixpkgs/nixos/modules/hardware/network/intel-2200bg.nix</screen></para>
|
||||
|
||||
</refsection>
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ desired operation. It must be one of the following:
|
|||
points to the output of the top-level “system” derivation. This
|
||||
is essentially the same as doing
|
||||
<screen>
|
||||
$ nix-build /etc/nixos/nixos -A system
|
||||
$ nix-build /path/to/nixpkgs/nixos -A system
|
||||
</screen>
|
||||
Note that you do not need to be <literal>root</literal> to run
|
||||
<command>nixos-rebuild build</command>.</para>
|
||||
|
|
Loading…
Reference in a new issue