Fixed indentation
This commit is contained in:
parent
42a84598fb
commit
7292c5a570
@ -29,8 +29,8 @@ form <literal><replaceable>name</replaceable> =
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{ <xref linkend="opt-services.httpd.enable"/> = true;
|
{ <xref linkend="opt-services.httpd.enable"/> = true;
|
||||||
<xref linkend="opt-services.httpd.adminAddr"/> = "alice@example.org";
|
<xref linkend="opt-services.httpd.adminAddr"/> = "alice@example.org";
|
||||||
<xref linkend="opt-services.httpd.documentRoot"/> = "/webroot";
|
<xref linkend="opt-services.httpd.documentRoot"/> = "/webroot";
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
|
@ -12,7 +12,10 @@ interfaces. However, you can configure an interface manually as
|
|||||||
follows:
|
follows:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<link linkend="opt-networking.interfaces._name__.ipv4.addresses">networking.interfaces.eth0.ipv4.addresses</link> = [ { address = "192.168.1.2"; prefixLength = 24; } ];
|
<link linkend="opt-networking.interfaces._name__.ipv4.addresses">networking.interfaces.eth0.ipv4.addresses</link> = [ {
|
||||||
|
address = "192.168.1.2";
|
||||||
|
prefixLength = 24;
|
||||||
|
} ];
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
Typically you’ll also want to set a default gateway and set of name
|
Typically you’ll also want to set a default gateway and set of name
|
||||||
|
@ -26,7 +26,10 @@ example, we use interface <varname>eth0</varname>):
|
|||||||
DHCPv6. You can configure an interface manually:
|
DHCPv6. You can configure an interface manually:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<link linkend="opt-networking.interfaces._name__.ipv6.addresses">networking.interfaces.eth0.ipv6.addresses</link> = [ { address = "fe00:aa:bb:cc::2"; prefixLength = 64; } ];
|
<link linkend="opt-networking.interfaces._name__.ipv6.addresses">networking.interfaces.eth0.ipv6.addresses</link> = [ {
|
||||||
|
address = "fe00:aa:bb:cc::2";
|
||||||
|
prefixLength = 64;
|
||||||
|
} ];
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -12,13 +12,13 @@ management. In the declarative style, users are specified in
|
|||||||
states that a user account named <literal>alice</literal> shall exist:
|
states that a user account named <literal>alice</literal> shall exist:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<xref linkend="opt-users.users"/>.alice =
|
<xref linkend="opt-users.users"/>.alice = {
|
||||||
{ <link linkend="opt-users.users._name__.isNormalUser">isNormalUser</link> = true;
|
<link linkend="opt-users.users._name__.isNormalUser">isNormalUser</link> = true;
|
||||||
<link linkend="opt-users.users._name__.home">home</link> = "/home/alice";
|
<link linkend="opt-users.users._name__.home">home</link> = "/home/alice";
|
||||||
<link linkend="opt-users.users._name__.description">description</link> = "Alice Foobar";
|
<link linkend="opt-users.users._name__.description">description</link> = "Alice Foobar";
|
||||||
<link linkend="opt-users.users._name__.extraGroups">extraGroups</link> = [ "wheel" "networkmanager" ];
|
<link linkend="opt-users.users._name__.extraGroups">extraGroups</link> = [ "wheel" "networkmanager" ];
|
||||||
<link linkend="opt-users.users._name__.openssh.authorizedKeys.keys">openssh.authorizedKeys.keys</link> = [ "ssh-dss AAAAB3Nza... alice@foobar" ];
|
<link linkend="opt-users.users._name__.openssh.authorizedKeys.keys">openssh.authorizedKeys.keys</link> = [ "ssh-dss AAAAB3Nza... alice@foobar" ];
|
||||||
};
|
};
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
Note that <literal>alice</literal> is a member of the
|
Note that <literal>alice</literal> is a member of the
|
||||||
|
@ -183,7 +183,9 @@ $ sudo groupdel nixbld</screen>
|
|||||||
account with <literal>sudo passwd -l root</literal> if you use
|
account with <literal>sudo passwd -l root</literal> if you use
|
||||||
<literal>sudo</literal>)</para>
|
<literal>sudo</literal>)</para>
|
||||||
|
|
||||||
<programlisting><link linkend="opt-users.users._name__.initialHashedPassword">users.extraUsers.root.initialHashedPassword</link> = "";</programlisting>
|
<programlisting>
|
||||||
|
<link linkend="opt-users.users._name__.initialHashedPassword">users.extraUsers.root.initialHashedPassword</link> = "";
|
||||||
|
</programlisting>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -243,13 +245,15 @@ $ sudo groupdel nixbld</screen>
|
|||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ sudo touch /etc/NIXOS
|
$ sudo touch /etc/NIXOS
|
||||||
$ sudo touch /etc/NIXOS_LUSTRATE</screen>
|
$ sudo touch /etc/NIXOS_LUSTRATE
|
||||||
|
</screen>
|
||||||
|
|
||||||
<para>Let's also make sure the NixOS configuration files are kept
|
<para>Let's also make sure the NixOS configuration files are kept
|
||||||
once we reboot on NixOS:</para>
|
once we reboot on NixOS:</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ echo etc/nixos | sudo tee -a /etc/NIXOS_LUSTRATE</screen>
|
$ echo etc/nixos | sudo tee -a /etc/NIXOS_LUSTRATE
|
||||||
|
</screen>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -273,9 +273,9 @@ for a UEFI installation is by and large the same as a BIOS installation. The dif
|
|||||||
you to set the password for the <literal>root</literal> user, e.g.
|
you to set the password for the <literal>root</literal> user, e.g.
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
setting root password...
|
setting root password...
|
||||||
Enter new UNIX password: ***
|
Enter new UNIX password: ***
|
||||||
Retype new UNIX password: ***
|
Retype new UNIX password: ***
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
@ -380,25 +380,24 @@ drive (here <filename>/dev/sda</filename>). <xref linkend="ex-config"
|
|||||||
|
|
||||||
<example xml:id='ex-config'><title>NixOS Configuration</title>
|
<example xml:id='ex-config'><title>NixOS Configuration</title>
|
||||||
<screen>
|
<screen>
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
{
|
# Include the results of the hardware scan.
|
||||||
imports =
|
|
||||||
[ # Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
<xref linkend="opt-boot.loader.grub.device"/> = "/dev/sda"; # <lineannotation>(for BIOS systems only)</lineannotation>
|
<xref linkend="opt-boot.loader.grub.device"/> = "/dev/sda"; # <lineannotation>(for BIOS systems only)</lineannotation>
|
||||||
<xref linkend="opt-boot.loader.systemd-boot.enable"/> = true; # <lineannotation>(for UEFI systems only)</lineannotation>
|
<xref linkend="opt-boot.loader.systemd-boot.enable"/> = true; # <lineannotation>(for UEFI systems only)</lineannotation>
|
||||||
|
|
||||||
# Note: setting fileSystems is generally not
|
# Note: setting fileSystems is generally not
|
||||||
# necessary, since nixos-generate-config figures them out
|
# necessary, since nixos-generate-config figures them out
|
||||||
# automatically in hardware-configuration.nix.
|
# automatically in hardware-configuration.nix.
|
||||||
#<link linkend="opt-fileSystems._name__.device">fileSystems."/".device</link> = "/dev/disk/by-label/nixos";
|
#<link linkend="opt-fileSystems._name__.device">fileSystems."/".device</link> = "/dev/disk/by-label/nixos";
|
||||||
|
|
||||||
# Enable the OpenSSH server.
|
# Enable the OpenSSH server.
|
||||||
services.sshd.enable = true;
|
services.sshd.enable = true;
|
||||||
}</screen>
|
}
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<xi:include href="installing-usb.xml" />
|
<xi:include href="installing-usb.xml" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user