2008-12-04 16:48:27 +01:00
|
|
|
{pkgs, config, ...}:
|
2008-08-08 20:56:58 +02:00
|
|
|
|
|
|
|
let
|
2009-01-25 16:49:12 +01:00
|
|
|
inherit (pkgs.lib) mkOption mergeOneOption;
|
2008-08-08 20:56:58 +02:00
|
|
|
in
|
2007-01-08 23:41:41 +01:00
|
|
|
|
2007-11-09 19:12:23 +01:00
|
|
|
{
|
2006-12-11 17:10:23 +01:00
|
|
|
|
2007-11-09 19:12:23 +01:00
|
|
|
boot = {
|
|
|
|
|
2008-01-04 17:11:12 +01:00
|
|
|
extraTTYs = mkOption {
|
|
|
|
default = [];
|
|
|
|
example = [8 9];
|
|
|
|
description = "
|
|
|
|
Tty (virtual console) devices, in addition to the consoles on
|
|
|
|
which mingetty and syslogd run, that must be initialised.
|
|
|
|
Only useful if you have some program that you want to run on
|
|
|
|
some fixed console. For example, the NixOS installation CD
|
|
|
|
opens the manual in a web browser on console 7, so it sets
|
|
|
|
<option>boot.extraTTYs</option> to <literal>[7]</literal>.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-09 19:12:23 +01:00
|
|
|
};
|
2006-11-27 16:07:46 +01:00
|
|
|
|
2008-02-04 11:52:58 +01:00
|
|
|
|
2007-11-09 19:12:23 +01:00
|
|
|
networking = {
|
2007-02-12 17:00:55 +01:00
|
|
|
|
2007-11-09 19:12:23 +01:00
|
|
|
hostName = mkOption {
|
|
|
|
default = "nixos";
|
2007-12-04 16:02:48 +01:00
|
|
|
description = "
|
|
|
|
The name of the machine. Leave it empty if you want to obtain
|
|
|
|
it from a DHCP server (if using DHCP).
|
|
|
|
";
|
2007-11-09 19:12:23 +01:00
|
|
|
};
|
2007-02-12 17:00:55 +01:00
|
|
|
|
2008-06-30 17:13:02 +02:00
|
|
|
nativeIPv6 = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to use IPv6 even though gw6c is not used. For example,
|
2008-07-23 16:13:27 +02:00
|
|
|
for Postfix.
|
2008-06-30 17:13:02 +02:00
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-09 19:12:23 +01:00
|
|
|
extraHosts = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "192.168.0.1 lanlocalhost";
|
2008-08-09 14:03:08 +02:00
|
|
|
description = ''
|
|
|
|
Additional entries to be appended to <filename>/etc/hosts</filename>.
|
|
|
|
'';
|
2007-11-09 19:12:23 +01:00
|
|
|
};
|
2007-03-04 00:20:08 +01:00
|
|
|
|
2007-11-09 19:12:23 +01:00
|
|
|
defaultGateway = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "131.211.84.1";
|
|
|
|
description = "
|
|
|
|
The default gateway. It can be left empty if it is auto-detected through DHCP.
|
|
|
|
";
|
|
|
|
};
|
2007-08-14 18:43:56 +02:00
|
|
|
|
2007-11-09 19:12:23 +01:00
|
|
|
nameservers = mkOption {
|
|
|
|
default = [];
|
|
|
|
example = ["130.161.158.4" "130.161.33.17"];
|
|
|
|
description = "
|
|
|
|
The list of nameservers. It can be left empty if it is auto-detected through DHCP.
|
|
|
|
";
|
|
|
|
};
|
2007-08-14 18:43:56 +02:00
|
|
|
|
2007-11-23 18:12:37 +01:00
|
|
|
domain = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "home";
|
|
|
|
description = "
|
|
|
|
The domain. It can be left empty if it is auto-detected through DHCP.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-09 19:12:23 +01:00
|
|
|
localCommands = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "text=anything; echo You can put $text here.";
|
|
|
|
description = "
|
|
|
|
Shell commands to be executed at the end of the
|
|
|
|
<literal>network-interfaces</literal> Upstart job. Note that if
|
|
|
|
you are using DHCP to obtain the network configuration,
|
|
|
|
interfaces may not be fully configured yet.
|
|
|
|
";
|
|
|
|
};
|
2007-08-14 18:43:56 +02:00
|
|
|
|
2007-11-09 19:12:23 +01:00
|
|
|
};
|
2007-11-08 19:15:12 +01:00
|
|
|
|
|
|
|
|
2007-12-20 12:36:30 +01:00
|
|
|
nesting = {
|
2008-01-02 14:05:24 +01:00
|
|
|
children = mkOption {
|
|
|
|
default = [];
|
2008-01-02 16:31:04 +01:00
|
|
|
description = "
|
2008-01-02 14:05:24 +01:00
|
|
|
Additional configurations to build.
|
2008-01-02 16:31:04 +01:00
|
|
|
";
|
2008-01-02 14:05:24 +01:00
|
|
|
};
|
2007-12-20 12:36:30 +01:00
|
|
|
};
|
2007-11-09 19:12:23 +01:00
|
|
|
|
2009-02-22 17:08:33 +01:00
|
|
|
|
2009-05-27 11:09:17 +02:00
|
|
|
require = import ../modules/module-list.nix;
|
2007-11-09 19:12:23 +01:00
|
|
|
}
|