* Move the configuration examples to doc/.
svn path=/nixos/trunk/; revision=12723
This commit is contained in:
21
doc/config-examples/basic.nix
Normal file
21
doc/config-examples/basic.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
boot = {
|
||||
grubDevice = "/dev/sda";
|
||||
};
|
||||
|
||||
fileSystems = [
|
||||
{ mountPoint = "/";
|
||||
device = "/dev/sda1";
|
||||
}
|
||||
];
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/sdb1"; }
|
||||
];
|
||||
|
||||
services = {
|
||||
sshd = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
32
doc/config-examples/closed-install-configuration.nix
Normal file
32
doc/config-examples/closed-install-configuration.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
boot = {
|
||||
grubDevice = "/dev/sda";
|
||||
copyKernels = true;
|
||||
bootMount = "(hd0,0)";
|
||||
};
|
||||
|
||||
fileSystems = [
|
||||
{ mountPoint = "/";
|
||||
device = "/dev/sda3";
|
||||
}
|
||||
{ mountPoint = "/boot";
|
||||
device = "/dev/sda1";
|
||||
neededForBoot = true;
|
||||
}
|
||||
];
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/sda2"; }
|
||||
];
|
||||
|
||||
services = {
|
||||
sshd = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableFontConfig = false;
|
||||
};
|
||||
|
||||
}
|
||||
36
doc/config-examples/root-on-lvm.nix
Normal file
36
doc/config-examples/root-on-lvm.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
# This configuration has / on a LVM volume. Since Grub
|
||||
# doesn't know about LVM, a separate /boot is therefore
|
||||
# needed. In particular you need to set "copyKernels"
|
||||
# to tell NixOS to copy kernels and initrds from /nix/store
|
||||
# to /boot, and "bootMount" to tell Grub the /boot device
|
||||
# in Grub syntax (e.g. (hd0,0) for /dev/sda1).
|
||||
#
|
||||
# In this example, labels are used for file systems and
|
||||
# swap devices: "boot" might be /dev/sda1, "root" might be
|
||||
# /dev/my-volume-group/root, and "swap" might be /dev/sda2.
|
||||
# In particular there is no specific reference to the fact
|
||||
# that / is on LVM; that's figured out automatically.
|
||||
|
||||
{
|
||||
boot = {
|
||||
grubDevice = "/dev/sda";
|
||||
initrd = {
|
||||
extraKernelModules = ["ata_piix"];
|
||||
};
|
||||
copyKernels = true;
|
||||
bootMount = "(hd0,0)";
|
||||
};
|
||||
|
||||
fileSystems = [
|
||||
{ mountPoint = "/";
|
||||
label = "root";
|
||||
}
|
||||
{ mountPoint = "/boot";
|
||||
label = "boot";
|
||||
}
|
||||
];
|
||||
|
||||
swapDevices = [
|
||||
{ label = "swap"; }
|
||||
];
|
||||
}
|
||||
36
doc/config-examples/svn-server.nix
Normal file
36
doc/config-examples/svn-server.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
boot = {
|
||||
grubDevice = "/dev/sda";
|
||||
};
|
||||
|
||||
fileSystems = [
|
||||
{ mountPoint = "/";
|
||||
device = "/dev/sda1";
|
||||
}
|
||||
];
|
||||
|
||||
services = {
|
||||
|
||||
sshd = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
httpd = {
|
||||
enable = true;
|
||||
adminAddr = "admin@example.org";
|
||||
|
||||
subservices = {
|
||||
|
||||
subversion = {
|
||||
enable = true;
|
||||
dataDir = "/data/subversion";
|
||||
notificationSender = "svn@example.org";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
27
doc/config-examples/x86_64-usbstick.nix
Normal file
27
doc/config-examples/x86_64-usbstick.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
# Configuration file used to install NixOS-x86_64 on a USB stick.
|
||||
|
||||
{
|
||||
boot = {
|
||||
grubDevice = "/dev/sda";
|
||||
initrd = {
|
||||
extraKernelModules = ["usb_storage" "ehci_hcd" "ohci_hcd"];
|
||||
enableSplashScreen = false;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = [
|
||||
{ mountPoint = "/";
|
||||
label = "nixos-usb";
|
||||
}
|
||||
];
|
||||
|
||||
services = {
|
||||
ttyBackgrounds = {
|
||||
enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableFontConfig = false;
|
||||
};
|
||||
}
|
||||
@@ -147,10 +147,10 @@ $ lvcreate --size 1G --name smalldisk MyVolGroup</screen>
|
||||
activated. The configuration is specified in a Nix expression and
|
||||
must be stored <emphasis>on the target file system</emphasis> in
|
||||
<filename>/mnt/etc/nixos/configuration.nix</filename>. See
|
||||
<filename>/etc/nixos/nixos/configuration/examples</filename> for
|
||||
<filename>/etc/nixos/nixos/doc/config-examples</filename> for
|
||||
example machine configurations. You can copy and edit one of
|
||||
those (e.g., copy
|
||||
<filename>/etc/nixos/nixos/configuration/examples/basic.nix</filename>
|
||||
<filename>/etc/nixos/nixos/doc/config-examples/basic.nix</filename>
|
||||
to <filename>/mnt/etc/nixos/configuration.nix</filename>). See
|
||||
<xref linkend="ch-options"/> for a list of the available
|
||||
configuration options. The text editors <command>nano</command>
|
||||
|
||||
Reference in New Issue
Block a user