2008-12-04 15:48:27 +00:00
|
|
|
{pkgs, config, ...}:
|
2008-08-08 19:56:58 +01:00
|
|
|
|
|
|
|
let
|
2009-01-25 15:49:12 +00:00
|
|
|
inherit (pkgs.lib) mkOption mergeOneOption;
|
2008-08-08 19:56:58 +01:00
|
|
|
in
|
2007-01-08 22:41:41 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
{
|
2006-12-11 16:10:23 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
time = {
|
2006-12-11 17:36:57 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
timeZone = mkOption {
|
|
|
|
default = "CET";
|
|
|
|
example = "America/New_York";
|
|
|
|
description = "The time zone used when displaying times and dates.";
|
|
|
|
};
|
2006-12-11 17:36:57 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2006-12-22 23:34:42 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
|
|
|
|
boot = {
|
|
|
|
|
2008-01-24 16:56:09 +00:00
|
|
|
isLiveCD = mkOption {
|
2007-11-09 18:12:23 +00:00
|
|
|
default = false;
|
|
|
|
description = "
|
2008-01-24 16:56:09 +00:00
|
|
|
If set to true, the root device will be mounted read-only and
|
|
|
|
a ramdisk will be mounted on top of it using unionfs to
|
|
|
|
provide a writable root. This is used for the NixOS
|
|
|
|
Live-CD/DVD.
|
2007-11-09 18:12:23 +00:00
|
|
|
";
|
|
|
|
};
|
2006-12-19 22:12:44 +00:00
|
|
|
|
2008-03-24 19:37:32 +00:00
|
|
|
resumeDevice = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "0:0";
|
|
|
|
description = "
|
|
|
|
Device for manual resume attempt during boot. Looks like
|
2008-07-23 15:13:27 +01:00
|
|
|
major:minor .
|
2008-03-24 19:37:32 +00:00
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
hardwareScan = mkOption {
|
|
|
|
default = true;
|
|
|
|
description = "
|
|
|
|
Whether to try to load kernel modules for all detected hardware.
|
|
|
|
Usually this does a good job of providing you with the modules
|
|
|
|
you need, but sometimes it can crash the system or cause other
|
|
|
|
nasty effects. If the hardware scan is turned on, it can be
|
|
|
|
disabled at boot time by adding the <literal>safemode</literal>
|
|
|
|
parameter to the kernel command line.
|
|
|
|
";
|
|
|
|
};
|
2007-01-22 18:58:04 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
initrd = {
|
|
|
|
|
2008-03-24 19:37:32 +00:00
|
|
|
allowMissing = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''
|
|
|
|
Allow some initrd components to be missing. Useful for
|
|
|
|
custom kernel that are changed too often to track needed
|
|
|
|
kernelModules.
|
|
|
|
'';
|
2008-03-24 19:37:32 +00:00
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
lvm = mkOption {
|
2008-05-09 11:08:21 +01:00
|
|
|
default = true;
|
2007-11-09 18:12:23 +00:00
|
|
|
description = "
|
|
|
|
Whether to include lvm in the initial ramdisk. You should use this option
|
|
|
|
if your ROOT device is on lvm volume.
|
|
|
|
";
|
|
|
|
};
|
2007-03-06 00:45:33 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
enableSplashScreen = mkOption {
|
|
|
|
default = true;
|
|
|
|
description = "
|
|
|
|
Whether to show a nice splash screen while booting.
|
|
|
|
";
|
|
|
|
};
|
2007-06-15 12:40:57 +01:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
copyKernels = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether the Grub menu builder should copy kernels and initial
|
|
|
|
ramdisks to /boot. This is necessary when /nix is on a
|
|
|
|
different file system than /boot.
|
|
|
|
";
|
|
|
|
};
|
2007-06-15 12:40:57 +01:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
localCommands = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "text=anything; echo You can put $text here.";
|
|
|
|
description = "
|
|
|
|
Shell commands to be executed just before Upstart is started.
|
|
|
|
";
|
|
|
|
};
|
2007-03-03 23:20:08 +00:00
|
|
|
|
2008-01-04 16:11:12 +00: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 18:12:23 +00:00
|
|
|
};
|
2006-11-27 15:07:46 +00:00
|
|
|
|
2008-11-18 18:00:09 +00:00
|
|
|
system = {
|
|
|
|
# NSS modules. Hacky!
|
|
|
|
nssModules = mkOption {
|
|
|
|
internal = true;
|
|
|
|
default = [];
|
|
|
|
description = "
|
|
|
|
Search path for NSS (Name Service Switch) modules. This allows
|
|
|
|
several DNS resolution methods to be specified via
|
|
|
|
<filename>/etc/nsswitch.conf</filename>.
|
|
|
|
";
|
|
|
|
merge = pkgs.lib.mergeListOption;
|
|
|
|
apply = list:
|
|
|
|
let
|
|
|
|
list2 =
|
|
|
|
list
|
2008-11-23 01:28:58 +00:00
|
|
|
++ pkgs.lib.optional config.users.ldap.enable pkgs.nss_ldap;
|
2008-11-18 18:00:09 +00:00
|
|
|
in {
|
|
|
|
list = list2;
|
|
|
|
path = pkgs.lib.makeLibraryPath list2;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
modulesTree = mkOption {
|
|
|
|
internal = true;
|
|
|
|
default = [];
|
|
|
|
description = "
|
|
|
|
Tree of kernel modules. This includes the kernel, plus modules
|
|
|
|
built outside of the kernel. Combine these into a single tree of
|
|
|
|
symlinks because modprobe only supports one directory.
|
|
|
|
";
|
|
|
|
merge = pkgs.lib.mergeListOption;
|
|
|
|
|
|
|
|
# Convert the list of path to only one path.
|
2009-01-25 15:48:48 +00:00
|
|
|
apply = pkgs.aggregateModules;
|
2008-11-18 18:00:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sbin = {
|
|
|
|
modprobe = mkOption {
|
|
|
|
# should be moved in module-init-tools
|
|
|
|
internal = true;
|
|
|
|
default = pkgs.substituteAll {
|
|
|
|
dir = "sbin";
|
|
|
|
src = ./modprobe;
|
|
|
|
isExecutable = true;
|
|
|
|
inherit (pkgs) module_init_tools;
|
|
|
|
inherit (config.system) modulesTree;
|
|
|
|
};
|
|
|
|
description = "
|
|
|
|
Path to the modprobe binary used by the system.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
mount = mkOption {
|
|
|
|
internal = true;
|
|
|
|
default = pkgs.utillinux.passthru.function {
|
|
|
|
buildMountOnly = true;
|
|
|
|
mountHelpers = pkgs.buildEnv {
|
|
|
|
name = "mount-helpers";
|
|
|
|
paths = [
|
|
|
|
pkgs.ntfs3g
|
|
|
|
pkgs.mount_cifs
|
|
|
|
];
|
|
|
|
pathsToLink = "/sbin";
|
|
|
|
} + "/sbin";
|
|
|
|
};
|
|
|
|
description = "
|
|
|
|
Install a special version of mount to search mount tools in
|
|
|
|
unusual path.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2006-11-27 15:07:46 +00:00
|
|
|
|
2008-02-04 10:52:58 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
networking = {
|
2007-02-12 16:00:55 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
hostName = mkOption {
|
|
|
|
default = "nixos";
|
2007-12-04 15:02:48 +00: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 18:12:23 +00:00
|
|
|
};
|
2007-02-12 16:00:55 +00:00
|
|
|
|
2008-06-30 16:13:02 +01:00
|
|
|
nativeIPv6 = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to use IPv6 even though gw6c is not used. For example,
|
2008-07-23 15:13:27 +01:00
|
|
|
for Postfix.
|
2008-06-30 16:13:02 +01:00
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
extraHosts = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "192.168.0.1 lanlocalhost";
|
2008-08-09 13:03:08 +01:00
|
|
|
description = ''
|
|
|
|
Additional entries to be appended to <filename>/etc/hosts</filename>.
|
|
|
|
'';
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2007-03-03 23:20:08 +00:00
|
|
|
|
2007-11-09 18:12:23 +00: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 17:43:56 +01:00
|
|
|
|
2007-11-09 18:12:23 +00: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 17:43:56 +01:00
|
|
|
|
2007-11-23 17:12:37 +00:00
|
|
|
domain = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "home";
|
|
|
|
description = "
|
|
|
|
The domain. It can be left empty if it is auto-detected through DHCP.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00: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 17:43:56 +01:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
interfaceMonitor = {
|
2007-11-08 18:15:12 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
If <literal>true</literal>, monitor Ethernet interfaces for
|
|
|
|
cables being plugged in or unplugged. When this occurs, the
|
|
|
|
<command>dhclient</command> service is restarted to
|
|
|
|
automatically obtain a new IP address. This is useful for
|
|
|
|
roaming users (laptops).
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
beep = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
If <literal>true</literal>, beep when an Ethernet cable is
|
|
|
|
plugged in or unplugged.
|
|
|
|
";
|
|
|
|
};
|
2007-11-08 18:15:12 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2007-11-08 18:15:12 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
defaultMailServer = {
|
2007-11-08 18:15:12 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
directDelivery = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "
|
|
|
|
Use the trivial Mail Transfer Agent (MTA)
|
|
|
|
<command>ssmtp</command> package to allow programs to send
|
2007-11-10 13:35:15 +00:00
|
|
|
e-mail. If you don't want to run a ``real'' MTA like
|
2007-11-09 18:12:23 +00:00
|
|
|
<command>sendmail</command> or <command>postfix</command> on
|
|
|
|
your machine, set this option to <literal>true</literal>, and
|
|
|
|
set the option
|
|
|
|
<option>networking.defaultMailServer.hostName</option> to the
|
|
|
|
host name of your preferred mail server.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
hostName = mkOption {
|
|
|
|
example = "mail.example.org";
|
|
|
|
description = "
|
|
|
|
The host name of the default mail server to use to deliver
|
|
|
|
e-mail.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-23 17:12:37 +00:00
|
|
|
domain = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "example.org";
|
|
|
|
description = "
|
|
|
|
The domain from which mail will appear to be sent.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
useTLS = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "
|
|
|
|
Whether TLS should be used to connect to the default mail
|
|
|
|
server.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
useSTARTTLS = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "
|
|
|
|
Whether the STARTTLS should be used to connect to the default
|
|
|
|
mail server. (This is needed for TLS-capable mail servers
|
|
|
|
running on the default SMTP port 25.)
|
|
|
|
";
|
|
|
|
};
|
2007-11-08 18:15:12 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2007-11-08 18:15:12 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2007-11-08 18:15:12 +00:00
|
|
|
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
fileSystems = mkOption {
|
2006-12-21 01:07:23 +00:00
|
|
|
default = [];
|
2006-11-27 15:07:46 +00:00
|
|
|
example = [
|
2006-12-21 00:16:20 +00:00
|
|
|
{ mountPoint = "/";
|
|
|
|
device = "/dev/hda1";
|
|
|
|
}
|
|
|
|
{ mountPoint = "/data";
|
|
|
|
device = "/dev/hda2";
|
2006-12-21 14:44:22 +00:00
|
|
|
fsType = "ext3";
|
2006-12-21 00:16:20 +00:00
|
|
|
options = "data=journal";
|
2006-11-27 15:07:46 +00:00
|
|
|
}
|
2007-01-10 13:58:48 +00:00
|
|
|
{ mountPoint = "/bigdisk";
|
|
|
|
label = "bigdisk";
|
|
|
|
}
|
2006-11-27 15:07:46 +00:00
|
|
|
];
|
|
|
|
description = "
|
2006-12-21 00:16:20 +00:00
|
|
|
The file systems to be mounted. It must include an entry for
|
2008-08-09 00:01:30 +01:00
|
|
|
the root directory (<literal>mountPoint = \"/\"</literal>). Each
|
2006-12-21 01:07:23 +00:00
|
|
|
entry in the list is an attribute set with the following fields:
|
|
|
|
<literal>mountPoint</literal>, <literal>device</literal>,
|
2006-12-21 14:44:22 +00:00
|
|
|
<literal>fsType</literal> (a file system type recognised by
|
2006-12-21 01:07:23 +00:00
|
|
|
<command>mount</command>; defaults to
|
2006-12-21 14:44:22 +00:00
|
|
|
<literal>\"auto\"</literal>), and <literal>options</literal>
|
|
|
|
(the mount options passed to <command>mount</command> using the
|
|
|
|
<option>-o</option> flag; defaults to <literal>\"defaults\"</literal>).
|
2007-01-10 13:58:48 +00:00
|
|
|
|
|
|
|
Instead of specifying <literal>device</literal>, you can also
|
2007-01-23 11:18:23 +00:00
|
|
|
specify a volume label (<literal>label</literal>) for file
|
2007-01-10 13:58:48 +00:00
|
|
|
systems that support it, such as ext2/ext3 (see <command>mke2fs
|
|
|
|
-L</command>).
|
2007-12-31 08:52:59 +00:00
|
|
|
|
|
|
|
<literal>autocreate</literal> forces <literal>mountPoint</literal> to be created with
|
|
|
|
<command>mkdir -p</command> .
|
2006-11-27 15:07:46 +00:00
|
|
|
";
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2006-11-27 15:07:46 +00:00
|
|
|
|
2006-12-18 17:41:57 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
swapDevices = mkOption {
|
2006-12-21 01:07:23 +00:00
|
|
|
default = [];
|
2007-01-10 13:07:57 +00:00
|
|
|
example = [
|
2007-11-09 18:12:23 +00:00
|
|
|
{ device = "/dev/hda7"; }
|
|
|
|
{ device = "/var/swapfile"; }
|
|
|
|
{ label = "bigswap"; }
|
2007-01-10 13:07:57 +00:00
|
|
|
];
|
2006-12-21 01:07:23 +00:00
|
|
|
description = "
|
|
|
|
The swap devices and swap files. These must have been
|
2007-01-10 13:07:57 +00:00
|
|
|
initialised using <command>mkswap</command>. Each element
|
|
|
|
should be an attribute set specifying either the path of the
|
|
|
|
swap device or file (<literal>device</literal>) or the label
|
|
|
|
of the swap device (<literal>label</literal>, see
|
2007-01-23 11:06:31 +00:00
|
|
|
<command>mkswap -L</command>). Using a label is
|
2007-01-10 13:07:57 +00:00
|
|
|
recommended.
|
2006-12-21 01:07:23 +00:00
|
|
|
";
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2006-12-21 01:07:23 +00:00
|
|
|
|
2008-03-16 01:05:40 +00:00
|
|
|
servicesProposal = {
|
|
|
|
# see upstart-jobs/default.nix
|
|
|
|
# the option declarations can be found in the upstart-jobs/newProposal/*.nix files
|
|
|
|
# one way to include the declarations here is adding kind of glob "*.nix"
|
|
|
|
# file function to builtins to get all jobs
|
|
|
|
# then the checking in upstart-jobs/default.nix can be removed again (together with passing arg optionDeclarations)
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
services = {
|
2006-12-18 17:41:57 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
|
|
|
|
syslogd = {
|
2007-01-08 22:41:41 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
tty = mkOption {
|
|
|
|
default = 10;
|
|
|
|
description = "
|
|
|
|
The tty device on which syslogd will print important log
|
|
|
|
messages.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
2006-12-11 16:10:23 +00:00
|
|
|
|
2007-01-23 11:18:23 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
ttyBackgrounds = {
|
2006-11-27 15:07:46 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
enable = mkOption {
|
|
|
|
default = true;
|
|
|
|
description = "
|
|
|
|
Whether to enable graphical backgrounds for the virtual consoles.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
defaultTheme = mkOption {
|
|
|
|
default = pkgs.fetchurl {
|
|
|
|
#url = http://www.bootsplash.de/files/themes/Theme-BabyTux.tar.bz2;
|
|
|
|
url = http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/Theme-BabyTux.tar.bz2;
|
|
|
|
md5 = "a6d89d1c1cff3b6a08e2f526f2eab4e0";
|
|
|
|
};
|
|
|
|
description = "
|
|
|
|
The default theme for the virtual consoles. Themes can be found
|
|
|
|
at <link xlink:href='http://www.bootsplash.de/' />.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
defaultSpecificThemes = mkOption {
|
|
|
|
default = [
|
|
|
|
/*
|
|
|
|
{ tty = 6;
|
|
|
|
theme = pkgs.fetchurl { # Yeah!
|
|
|
|
url = http://www.bootsplash.de/files/themes/Theme-Pativo.tar.bz2;
|
|
|
|
md5 = "9e13beaaadf88d43a5293e7ab757d569";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
{ tty = 10;
|
|
|
|
theme = pkgs.fetchurl {
|
|
|
|
#url = http://www.bootsplash.de/files/themes/Theme-GNU.tar.bz2;
|
|
|
|
url = http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/Theme-GNU.tar.bz2;
|
|
|
|
md5 = "61969309d23c631e57b0a311102ef034";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
description = "
|
|
|
|
This option sets specific themes for virtual consoles. If you
|
|
|
|
just want to set themes for additional consoles, use
|
|
|
|
<option>services.ttyBackgrounds.specificThemes</option>.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
specificThemes = mkOption {
|
|
|
|
default = [
|
|
|
|
];
|
|
|
|
description = "
|
|
|
|
This option allows you to set specific themes for virtual
|
|
|
|
consoles.
|
|
|
|
";
|
|
|
|
};
|
2007-03-16 16:41:38 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2007-03-16 16:41:38 +00:00
|
|
|
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
mingetty = {
|
2006-11-27 15:07:46 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
ttys = mkOption {
|
|
|
|
default = [1 2 3 4 5 6];
|
|
|
|
description = "
|
|
|
|
The list of tty (virtual console) devices on which to start a
|
|
|
|
login prompt.
|
|
|
|
";
|
|
|
|
};
|
2006-11-27 15:07:46 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
waitOnMounts = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether the login prompts on the virtual consoles will be
|
|
|
|
started before or after all file systems have been mounted. By
|
|
|
|
default we don't wait, but if for example your /home is on a
|
|
|
|
separate partition, you may want to turn this on.
|
|
|
|
";
|
|
|
|
};
|
2007-01-10 17:19:17 +00:00
|
|
|
|
2008-01-04 17:05:48 +00:00
|
|
|
greetingLine = mkOption {
|
|
|
|
default = ''<<< Welcome to NixOS (\m) - Kernel \r (\l) >>>'';
|
|
|
|
description = "
|
|
|
|
Welcome line printed by mingetty.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
helpLine = mkOption {
|
|
|
|
default = "";
|
|
|
|
description = "
|
|
|
|
Help line printed by mingetty below the welcome line.
|
|
|
|
Used by the installation CD to give some hints on
|
|
|
|
how to proceed.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2006-12-21 23:43:17 +00:00
|
|
|
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
dhcpd = {
|
2006-12-16 18:24:49 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to enable the DHCP server.
|
|
|
|
";
|
|
|
|
};
|
2007-10-26 06:52:35 +01:00
|
|
|
|
2007-12-04 14:53:37 +00:00
|
|
|
extraConfig = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "
|
|
|
|
option subnet-mask 255.255.255.0;
|
|
|
|
option broadcast-address 192.168.1.255;
|
|
|
|
option routers 192.168.1.5;
|
|
|
|
option domain-name-servers 130.161.158.4, 130.161.33.17, 130.161.180.1;
|
|
|
|
option domain-name \"example.org\";
|
|
|
|
subnet 192.168.1.0 netmask 255.255.255.0 {
|
|
|
|
range 192.168.1.100 192.168.1.200;
|
|
|
|
}
|
|
|
|
";
|
|
|
|
description = "
|
|
|
|
Extra text to be appended to the DHCP server configuration
|
|
|
|
file. Currently, you almost certainly need to specify
|
|
|
|
something here, such as the options specifying the subnet
|
|
|
|
mask, DNS servers, etc.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
configFile = mkOption {
|
2007-12-04 14:53:37 +00:00
|
|
|
default = null;
|
2007-11-09 18:12:23 +00:00
|
|
|
description = "
|
2007-12-04 14:53:37 +00:00
|
|
|
The path of the DHCP server configuration file. If no file
|
|
|
|
is specified, a file is generated using the other options.
|
2007-11-09 18:12:23 +00:00
|
|
|
";
|
|
|
|
};
|
2007-02-26 23:11:32 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
interfaces = mkOption {
|
|
|
|
default = ["eth0"];
|
|
|
|
description = "
|
|
|
|
The interfaces on which the DHCP server should listen.
|
|
|
|
";
|
|
|
|
};
|
2007-02-26 23:11:32 +00:00
|
|
|
|
2007-12-04 14:53:37 +00:00
|
|
|
machines = mkOption {
|
|
|
|
default = [];
|
|
|
|
example = [
|
|
|
|
{ hostName = "foo";
|
|
|
|
ethernetAddress = "00:16:76:9a:32:1d";
|
|
|
|
ipAddress = "192.168.1.10";
|
|
|
|
}
|
|
|
|
{ hostName = "bar";
|
|
|
|
ethernetAddress = "00:19:d1:1d:c4:9a";
|
|
|
|
ipAddress = "192.168.1.11";
|
|
|
|
}
|
|
|
|
];
|
2008-01-02 15:31:04 +00:00
|
|
|
description = "
|
2008-01-02 12:50:46 +00:00
|
|
|
A list mapping ethernet addresses to IP addresses for the
|
|
|
|
DHCP server.
|
2008-01-02 15:31:04 +00:00
|
|
|
";
|
2007-12-04 14:53:37 +00:00
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2007-02-26 23:11:32 +00:00
|
|
|
|
2007-02-27 00:31:04 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
sshd = {
|
2007-03-06 00:07:00 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to enable the Secure Shell daemon, which allows secure
|
|
|
|
remote logins.
|
|
|
|
";
|
|
|
|
};
|
2007-03-06 00:07:00 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
forwardX11 = mkOption {
|
|
|
|
default = true;
|
|
|
|
description = "
|
|
|
|
Whether to enable sshd to forward X11 connections.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
allowSFTP = mkOption {
|
|
|
|
default = true;
|
|
|
|
description = "
|
|
|
|
Whether to enable the SFTP subsystem in the SSH daemon. This
|
|
|
|
enables the use of commands such as <command>sftp</command> and
|
|
|
|
<command>sshfs</command>.
|
|
|
|
";
|
|
|
|
};
|
2007-04-02 16:01:09 +01:00
|
|
|
|
2008-03-14 12:53:14 +00:00
|
|
|
permitRootLogin = mkOption {
|
|
|
|
default = "yes";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Whether the root user can login using ssh. Valid options
|
|
|
|
are <command>yes</command>, <command>without-password</command>,
|
|
|
|
<command>forced-commands-only</command> or
|
|
|
|
<command>no</command>
|
|
|
|
";
|
2008-03-14 12:53:14 +00:00
|
|
|
};
|
2009-01-02 19:41:39 +00:00
|
|
|
|
|
|
|
gatewayPorts = mkOption {
|
|
|
|
default = "no";
|
|
|
|
description = "
|
|
|
|
Specifies whether remote hosts are allowed to connect to ports forwarded for the client. See man sshd_conf.
|
|
|
|
";
|
|
|
|
};
|
2007-06-05 12:51:59 +01:00
|
|
|
};
|
|
|
|
|
2008-03-05 16:03:09 +00:00
|
|
|
lshd = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''
|
|
|
|
Whether to enable the GNU lshd SSH2 daemon, which allows
|
2008-03-05 16:03:09 +00:00
|
|
|
secure remote login.
|
2008-07-23 15:13:27 +01:00
|
|
|
'';
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
portNumber = mkOption {
|
|
|
|
default = 22;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''
|
|
|
|
The port on which to listen for connections.
|
|
|
|
'';
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
interfaces = mkOption {
|
|
|
|
default = [];
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''
|
|
|
|
List of network interfaces where listening for connections.
|
2008-03-05 16:03:09 +00:00
|
|
|
When providing the empty list, `[]', lshd listens on all
|
|
|
|
network interfaces.
|
2008-07-23 15:13:27 +01:00
|
|
|
'';
|
|
|
|
example = [ "localhost" "1.2.3.4:443" ];
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hostKey = mkOption {
|
|
|
|
default = "/etc/lsh/host-key";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''
|
|
|
|
Path to the server's private key. Note that this key must
|
2008-03-05 16:03:09 +00:00
|
|
|
have been created, e.g., using "lsh-keygen --server |
|
|
|
|
lsh-writekey --server", so that you can run lshd.
|
2008-07-23 15:13:27 +01:00
|
|
|
'';
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
syslog = mkOption {
|
|
|
|
default = true;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''Whether to enable syslog output.'';
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
passwordAuthentication = mkOption {
|
|
|
|
default = true;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''Whether to enable password authentication.'';
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
publicKeyAuthentication = mkOption {
|
|
|
|
default = true;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''Whether to enable public key authentication.'';
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
rootLogin = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''Whether to enable remote root login.'';
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
loginShell = mkOption {
|
|
|
|
default = null;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''
|
|
|
|
If non-null, override the default login shell with the
|
|
|
|
specified value.
|
|
|
|
'';
|
|
|
|
example = "/nix/store/xyz-bash-10.0/bin/bash10";
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
srpKeyExchange = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''
|
|
|
|
Whether to enable SRP key exchange and user authentication.
|
|
|
|
'';
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
tcpForwarding = mkOption {
|
|
|
|
default = true;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''Whether to enable TCP/IP forwarding.'';
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
x11Forwarding = mkOption {
|
|
|
|
default = true;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''Whether to enable X11 forwarding.'';
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
subsystems = mkOption {
|
|
|
|
default = [ ["sftp" "${pkgs.lsh}/sbin/sftp-server"] ];
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''
|
|
|
|
List of subsystem-path pairs, where the head of the pair
|
2008-03-05 16:03:09 +00:00
|
|
|
denotes the subsystem name, and the tail denotes the path to
|
|
|
|
an executable implementing it.
|
2008-07-23 15:13:27 +01:00
|
|
|
'';
|
2008-03-05 16:03:09 +00:00
|
|
|
};
|
|
|
|
};
|
2007-09-24 06:16:15 +01:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
ntp = {
|
2007-09-24 06:16:15 +01:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
enable = mkOption {
|
|
|
|
default = true;
|
|
|
|
description = "
|
|
|
|
Whether to synchronise your machine's time using the NTP
|
|
|
|
protocol.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
servers = mkOption {
|
|
|
|
default = [
|
|
|
|
"0.pool.ntp.org"
|
|
|
|
"1.pool.ntp.org"
|
|
|
|
"2.pool.ntp.org"
|
|
|
|
];
|
|
|
|
description = "
|
|
|
|
The set of NTP servers from which to synchronise.
|
|
|
|
";
|
|
|
|
};
|
2006-12-18 19:20:03 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2007-02-27 19:04:30 +00:00
|
|
|
|
2008-03-15 23:40:44 +00:00
|
|
|
portmap = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = ''
|
|
|
|
Whether to enable `portmap', an ONC RPC directory service
|
|
|
|
notably used by NFS and NIS, and which can be queried
|
|
|
|
using the rpcinfo(1) command.
|
|
|
|
'';
|
2008-03-15 23:40:44 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2008-02-18 09:15:10 +00:00
|
|
|
bitlbee = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = ''
|
2008-03-06 17:11:22 +00:00
|
|
|
Whether to run the BitlBee IRC to other chat network gateway.
|
2008-02-18 09:15:10 +00:00
|
|
|
Running it allows you to access the MSN, Jabber, Yahoo! and ICQ chat
|
|
|
|
networks via an IRC client.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
interface = mkOption {
|
|
|
|
default = "127.0.0.1";
|
|
|
|
description = ''
|
|
|
|
The interface the BitlBee deamon will be listening to. If `127.0.0.1',
|
|
|
|
only clients on the local host can connect to it; if `0.0.0.0', clients
|
|
|
|
can access it from any network interface.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
portNumber = mkOption {
|
2008-03-26 16:42:57 +00:00
|
|
|
default = 6667;
|
2008-02-18 09:15:10 +00:00
|
|
|
description = ''
|
|
|
|
Number of the port BitlBee will be listening to.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
2006-12-18 19:46:48 +00:00
|
|
|
|
2008-09-04 21:28:02 +01:00
|
|
|
gnunet = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Whether to run the GNUnet daemon. GNUnet is GNU's anonymous
|
|
|
|
peer-to-peer communication and file sharing framework.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
home = mkOption {
|
|
|
|
default = "/var/lib/gnunet";
|
|
|
|
description = ''
|
|
|
|
Directory where the GNUnet daemon will store its data.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
debug = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
When true, run in debug mode; gnunetd will not daemonize and
|
|
|
|
error messages will be written to stderr instead of a
|
|
|
|
logfile.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
logLevel = mkOption {
|
|
|
|
default = "ERROR";
|
|
|
|
example = "INFO";
|
|
|
|
description = ''
|
|
|
|
Log level of the deamon (see `gnunetd(1)' for details).
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
hostLists = mkOption {
|
|
|
|
default = [
|
|
|
|
"http://gnunet.org/hostlist.php"
|
|
|
|
"http://gnunet.mine.nu:8081/hostlist"
|
|
|
|
"http://vserver1236.vserver-on.de/hostlist-074"
|
|
|
|
];
|
|
|
|
description = ''
|
|
|
|
URLs of host lists.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
applications = mkOption {
|
|
|
|
default = [ "advertising" "getoption" "fs" "stats" "traffic" ];
|
|
|
|
example = [ "chat" "fs" ];
|
|
|
|
description = ''
|
|
|
|
List of GNUnet applications supported by the daemon. Note that
|
|
|
|
`fs', which means "file sharing", is probably the one you want.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
transports = mkOption {
|
|
|
|
default = [ "udp" "tcp" "http" "nat" ];
|
|
|
|
example = [ "smtp" "http" ];
|
|
|
|
description = ''
|
|
|
|
List of transport methods used by the server.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSharing = {
|
|
|
|
quota = mkOption {
|
|
|
|
default = 1024;
|
|
|
|
description = ''
|
|
|
|
Maximum file system usage (in MiB) for file sharing.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
activeMigration = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Whether to allow active migration of content originating
|
|
|
|
from other nodes.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
load = {
|
|
|
|
maxNetDownBandwidth = mkOption {
|
|
|
|
default = 50000;
|
|
|
|
description = ''
|
|
|
|
Maximum bandwidth usage (in bits per second) for GNUnet
|
|
|
|
when downloading data.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
maxNetUpBandwidth = mkOption {
|
|
|
|
default = 50000;
|
|
|
|
description = ''
|
|
|
|
Maximum bandwidth usage (in bits per second) for GNUnet
|
|
|
|
when downloading data.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
hardNetUpBandwidth = mkOption {
|
|
|
|
default = 0;
|
|
|
|
description = ''
|
|
|
|
Hard bandwidth limit (in bits per second) when uploading
|
|
|
|
data.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
maxCPULoad = mkOption {
|
|
|
|
default = 100;
|
|
|
|
description = ''
|
|
|
|
Maximum CPU load (percentage) authorized for the GNUnet
|
|
|
|
daemon.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
interfaces = mkOption {
|
|
|
|
default = [ "eth0" ];
|
|
|
|
example = [ "wlan0" "eth1" ];
|
|
|
|
description = ''
|
|
|
|
List of network interfaces to use.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
extraOptions = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = ''
|
|
|
|
[NETWORK]
|
|
|
|
INTERFACE = eth3
|
|
|
|
'';
|
|
|
|
description = ''
|
|
|
|
Additional options that will be copied verbatim in `gnunetd.conf'.
|
|
|
|
See `gnunetd.conf(5)' for details.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-02-04 13:40:01 +00:00
|
|
|
ejabberd = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Whether to enable ejabberd server";
|
2008-02-04 13:40:01 +00:00
|
|
|
};
|
2008-07-06 11:30:53 +01:00
|
|
|
|
|
|
|
spoolDir = mkOption {
|
|
|
|
default = "/var/lib/ejabberd";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Location of the spooldir of ejabberd";
|
2008-07-06 11:30:53 +01:00
|
|
|
};
|
2008-02-04 13:40:01 +00:00
|
|
|
|
2008-07-06 11:30:53 +01:00
|
|
|
logsDir = mkOption {
|
|
|
|
default = "/var/log/ejabberd";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Location of the logfile directory of ejabberd";
|
2008-02-04 13:40:01 +00:00
|
|
|
};
|
2008-08-18 15:48:55 +01:00
|
|
|
|
|
|
|
confDir = mkOption {
|
|
|
|
default = "/var/ejabberd";
|
|
|
|
description = "Location of the config directory of ejabberd";
|
|
|
|
};
|
|
|
|
|
|
|
|
virtualHosts = mkOption {
|
|
|
|
default = "\"localhost\"";
|
|
|
|
description = "Virtualhosts that ejabberd should host. Hostnames are surrounded with doublequotes and separated by commas";
|
|
|
|
};
|
2008-02-04 13:40:01 +00:00
|
|
|
};
|
|
|
|
|
2008-01-28 15:16:14 +00:00
|
|
|
jboss = {
|
2008-01-28 20:04:48 +00:00
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Whether to enable jboss";
|
2008-01-28 20:04:48 +00:00
|
|
|
};
|
|
|
|
|
2008-01-28 15:16:14 +00:00
|
|
|
tempDir = mkOption {
|
|
|
|
default = "/tmp";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Location where JBoss stores its temp files";
|
2008-01-28 15:16:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
logDir = mkOption {
|
|
|
|
default = "/var/log/jboss";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Location of the logfile directory of JBoss";
|
2008-01-28 15:16:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
serverDir = mkOption {
|
|
|
|
description = "Location of the server instance files";
|
2008-07-23 15:13:27 +01:00
|
|
|
default = "/var/jboss/server";
|
2008-01-28 15:16:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
deployDir = mkOption {
|
|
|
|
description = "Location of the deployment files";
|
|
|
|
default = "/nix/var/nix/profiles/default/server/default/deploy/";
|
|
|
|
};
|
|
|
|
|
|
|
|
libUrl = mkOption {
|
|
|
|
default = "file:///nix/var/nix/profiles/default/server/default/lib";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Location where the shared library JARs are stored";
|
2008-01-28 15:16:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
user = mkOption {
|
|
|
|
default = "nobody";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "User account under which jboss runs.";
|
2008-01-28 15:16:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
useJK = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Whether to use to connector to the Apache HTTP server";
|
2008-01-28 15:16:14 +00:00
|
|
|
};
|
|
|
|
};
|
2007-08-15 13:01:20 +01:00
|
|
|
|
2008-01-30 11:00:00 +00:00
|
|
|
tomcat = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Whether to enable Apache Tomcat";
|
2008-01-30 11:00:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
baseDir = mkOption {
|
|
|
|
default = "/var/tomcat";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Location where Tomcat stores configuration files, webapplications and logfiles";
|
2008-01-30 11:00:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
user = mkOption {
|
2008-07-05 23:27:36 +01:00
|
|
|
default = "tomcat";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "User account under which Apache Tomcat runs.";
|
2008-01-30 11:00:00 +00:00
|
|
|
};
|
2008-01-30 14:38:27 +00:00
|
|
|
|
|
|
|
deployFrom = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Location where webapplications are stored. Leave empty to use the baseDir.";
|
2008-01-30 14:38:27 +00:00
|
|
|
};
|
2008-07-06 20:55:34 +01:00
|
|
|
|
|
|
|
javaOpts = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Parameters to pass to the Java Virtual Machine which spawns Apache Tomcat";
|
2008-07-06 20:55:34 +01:00
|
|
|
};
|
|
|
|
|
2008-08-11 22:35:45 +01:00
|
|
|
catalinaOpts = mkOption {
|
|
|
|
default = "";
|
|
|
|
description = "Parameters to pass to the Java Virtual Machine which spawns the Catalina servlet container";
|
|
|
|
};
|
|
|
|
|
2008-07-06 20:55:34 +01:00
|
|
|
sharedLibFrom = mkOption {
|
|
|
|
default = "";
|
2008-08-06 16:07:29 +01:00
|
|
|
description = "Location where shared libraries are stored. Leave empty to use the baseDir.";
|
2008-07-06 20:55:34 +01:00
|
|
|
};
|
2008-08-06 14:41:08 +01:00
|
|
|
|
|
|
|
commonLibFrom = mkOption {
|
|
|
|
default = "";
|
2008-08-06 16:07:29 +01:00
|
|
|
description = "Location where common libraries are stored. Leave empty to use the baseDir.";
|
|
|
|
};
|
|
|
|
|
|
|
|
contextXML = mkOption {
|
|
|
|
default = "";
|
2008-08-07 11:23:20 +01:00
|
|
|
description = "Location of the context.xml to use. Leave empty to use the default.";
|
2008-08-06 14:41:08 +01:00
|
|
|
};
|
2008-01-30 11:00:00 +00:00
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
httpd = {
|
2008-07-06 19:34:03 +01:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to enable the Apache httpd server.
|
|
|
|
";
|
|
|
|
};
|
2007-01-11 16:29:23 +00:00
|
|
|
|
2008-02-04 10:52:58 +00:00
|
|
|
experimental = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to use the new-style Apache configuration.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2008-03-16 01:05:40 +00:00
|
|
|
extraConfig = mkOption {
|
|
|
|
default = "";
|
|
|
|
description = "
|
|
|
|
These configuration lines will be passed verbatim to the apache config
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2008-04-28 00:56:51 +01:00
|
|
|
extraModules = mkOption {
|
2008-09-14 02:30:45 +01:00
|
|
|
default = [];
|
|
|
|
example = [ "proxy_connect" { name = "php5_module"; path = "${pkgs.php}/modules/libphp5.so"; } ];
|
2008-04-28 00:56:51 +01:00
|
|
|
description = ''
|
2009-01-02 19:41:39 +00:00
|
|
|
Specifies additional Apache modules. These can be specified
|
|
|
|
as a string in the case of modules distributed with Apache,
|
|
|
|
or as an attribute set specifying the
|
|
|
|
<varname>name</varname> and <varname>path</varname> of the
|
|
|
|
module.
|
2008-04-28 00:56:51 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2008-02-20 13:29:08 +00:00
|
|
|
logPerVirtualHost = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
If enabled, each virtual host gets its own
|
|
|
|
<filename>access_log</filename> and
|
|
|
|
<filename>error_log</filename>, namely suffixed by the
|
|
|
|
<option>hostName</option> of the virtual host.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
user = mkOption {
|
|
|
|
default = "wwwrun";
|
|
|
|
description = "
|
|
|
|
User account under which httpd runs. The account is created
|
|
|
|
automatically if it doesn't exist.
|
|
|
|
";
|
|
|
|
};
|
2007-04-07 22:44:26 +01:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
group = mkOption {
|
|
|
|
default = "wwwrun";
|
|
|
|
description = "
|
|
|
|
Group under which httpd runs. The account is created
|
|
|
|
automatically if it doesn't exist.
|
|
|
|
";
|
|
|
|
};
|
2007-04-07 22:44:26 +01:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
logDir = mkOption {
|
|
|
|
default = "/var/log/httpd";
|
|
|
|
description = "
|
|
|
|
Directory for Apache's log files. It is created automatically.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
stateDir = mkOption {
|
|
|
|
default = "/var/run/httpd";
|
|
|
|
description = "
|
|
|
|
Directory for Apache's transient runtime state (such as PID
|
|
|
|
files). It is created automatically. Note that the default,
|
|
|
|
<filename>/var/run/httpd</filename>, is deleted at boot time.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
mod_php = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "Whether to enable the PHP module.";
|
|
|
|
};
|
|
|
|
|
2008-01-28 15:40:29 +00:00
|
|
|
mod_jk = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Whether to enable the Apache Tomcat connector.";
|
|
|
|
};
|
|
|
|
|
|
|
|
applicationMappings = mkOption {
|
|
|
|
default = [];
|
|
|
|
description = "List of Java webapplications that should be mapped to the servlet container (Tomcat/JBoss)";
|
2008-01-28 15:40:29 +00:00
|
|
|
};
|
2008-01-28 15:44:59 +00:00
|
|
|
};
|
2008-02-14 07:42:52 +00:00
|
|
|
|
2008-02-14 14:14:39 +00:00
|
|
|
virtualHosts = mkOption {
|
|
|
|
default = [];
|
|
|
|
example = [
|
|
|
|
{ hostName = "foo";
|
|
|
|
documentRoot = "/data/webroot-foo";
|
|
|
|
}
|
|
|
|
{ hostName = "bar";
|
|
|
|
documentRoot = "/data/webroot-bar";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
description = ''
|
|
|
|
Specification of the virtual hosts served by Apache. Each
|
|
|
|
element should be an attribute set specifying the
|
|
|
|
configuration of the virtual host. The available options
|
|
|
|
are the non-global options permissible for the main host.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
subservices = {
|
|
|
|
|
2008-02-14 09:54:25 +00:00
|
|
|
# !!! remove this
|
2007-11-09 18:12:23 +00:00
|
|
|
subversion = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to enable the Subversion subservice in the webserver.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
notificationSender = mkOption {
|
2007-11-13 15:51:24 +00:00
|
|
|
default = "svn-server@example.org";
|
2007-11-09 18:12:23 +00:00
|
|
|
example = "svn-server@example.org";
|
|
|
|
description = "
|
|
|
|
The email address used in the Sender field of commit
|
|
|
|
notification messages sent by the Subversion subservice.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
userCreationDomain = mkOption {
|
2008-07-23 15:13:27 +01:00
|
|
|
default = "example.org";
|
2007-11-09 18:12:23 +00:00
|
|
|
example = "example.org";
|
|
|
|
description = "
|
|
|
|
The domain from which user creation is allowed. A client can
|
|
|
|
only create a new user account if its IP address resolves to
|
|
|
|
this domain.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
autoVersioning = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether you want the Subversion subservice to support
|
|
|
|
auto-versioning, which enables Subversion repositories to be
|
|
|
|
mounted as read/writable file systems on operating systems that
|
|
|
|
support WebDAV.
|
|
|
|
";
|
|
|
|
};
|
2008-07-23 15:13:27 +01:00
|
|
|
|
|
|
|
dataDir = mkOption {
|
|
|
|
default = "/no/such/path/exists";
|
|
|
|
description = "
|
|
|
|
Place to put SVN repository.
|
|
|
|
";
|
|
|
|
};
|
2007-11-09 18:12:23 +00:00
|
|
|
|
|
|
|
organization = {
|
|
|
|
|
|
|
|
name = mkOption {
|
|
|
|
default = null;
|
|
|
|
description = "
|
|
|
|
Name of the organization hosting the Subversion service.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
url = mkOption {
|
|
|
|
default = null;
|
|
|
|
description = "
|
|
|
|
URL of the website of the organization hosting the Subversion service.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
logo = mkOption {
|
|
|
|
default = null;
|
|
|
|
description = "
|
|
|
|
Logo the organization hosting the Subversion service.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2008-02-14 13:20:26 +00:00
|
|
|
} // # Include the options shared between the main server and virtual hosts.
|
|
|
|
(import ../upstart-jobs/apache-httpd/per-server-options.nix {
|
|
|
|
inherit mkOption;
|
|
|
|
forMainServer = true;
|
|
|
|
});
|
2007-11-09 18:12:23 +00:00
|
|
|
|
2008-02-07 12:41:18 +00:00
|
|
|
vsftpd = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Whether to enable the vsftpd FTP server.
|
|
|
|
";
|
2008-02-07 12:41:18 +00:00
|
|
|
};
|
|
|
|
|
2008-02-07 13:37:20 +00:00
|
|
|
anonymousUser = mkOption {
|
2008-02-07 12:41:18 +00:00
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Whether to enable the anonymous FTP user.
|
|
|
|
";
|
2008-02-07 12:41:18 +00:00
|
|
|
};
|
2008-08-04 10:36:11 +01:00
|
|
|
|
|
|
|
writeEnable = mkOption {
|
|
|
|
default = false;
|
2008-08-07 11:23:20 +01:00
|
|
|
description = "
|
|
|
|
Whether any write activity is permitted to users.
|
|
|
|
";
|
2008-08-04 10:36:11 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
anonymousUploadEnable = mkOption {
|
|
|
|
default = false;
|
2008-08-07 11:23:20 +01:00
|
|
|
description = "
|
|
|
|
Whether any uploads are permitted to anonymous users.
|
|
|
|
";
|
2008-08-04 10:36:11 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
anonymousMkdirEnable = mkOption {
|
|
|
|
default = false;
|
2008-08-07 11:23:20 +01:00
|
|
|
description = "
|
|
|
|
Whether mkdir is permitted to anonymous users.
|
|
|
|
";
|
2008-08-04 10:36:11 +01:00
|
|
|
};
|
2008-02-07 12:41:18 +00:00
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
printing = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to enable printing support through the CUPS daemon.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
udev = {
|
|
|
|
|
|
|
|
addFirmware = mkOption {
|
|
|
|
default = [];
|
|
|
|
example = ["/mnt/big-storage/firmware/"];
|
|
|
|
description = "
|
|
|
|
To specify firmware that is not too spread to ensure
|
|
|
|
a package, or have an interactive process of extraction
|
|
|
|
and cannot be redistributed.
|
|
|
|
";
|
2008-08-06 20:26:47 +01:00
|
|
|
merge = pkgs.lib.mergeListOption;
|
|
|
|
};
|
|
|
|
|
|
|
|
addUdevPkgs = mkOption {
|
|
|
|
default = [];
|
|
|
|
description = "
|
|
|
|
List of packages containing udev rules.
|
|
|
|
";
|
|
|
|
merge = pkgs.lib.mergeListOption;
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2008-01-02 10:07:52 +00:00
|
|
|
|
|
|
|
sndMode = mkOption {
|
|
|
|
default = "0600";
|
2008-07-23 15:13:27 +01:00
|
|
|
example = "0666";
|
|
|
|
description = "
|
|
|
|
Permissions for /dev/snd/*, in case you have multiple
|
|
|
|
logged in users or if the devices belong to root for
|
|
|
|
some reason.
|
|
|
|
";
|
2008-01-02 10:07:52 +00:00
|
|
|
};
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
samba = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to enable the samba server. (to communicate with, and provide windows shares)
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
gw6c = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to enable Gateway6 client (IPv6 tunnel).
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2008-01-11 06:36:15 +00:00
|
|
|
autorun = mkOption {
|
|
|
|
default = true;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Switch to false to create upstart-job and configuration,
|
|
|
|
but not run it automatically
|
|
|
|
";
|
2008-01-11 06:36:15 +00:00
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
username = mkOption {
|
|
|
|
default = "";
|
|
|
|
description = "
|
|
|
|
Your Gateway6 login name, if any.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
password = mkOption {
|
|
|
|
default = "";
|
|
|
|
description = "
|
|
|
|
Your Gateway6 password, if any.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
server = mkOption {
|
|
|
|
default = "anon.freenet6.net";
|
|
|
|
example = "broker.freenet6.net";
|
|
|
|
description = "
|
|
|
|
Used Gateway6 server.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
keepAlive = mkOption {
|
|
|
|
default = "30";
|
|
|
|
example = "2";
|
|
|
|
description = "
|
|
|
|
Gateway6 keep-alive period.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
everPing = mkOption {
|
|
|
|
default = "1000000";
|
|
|
|
example = "2";
|
|
|
|
description = "
|
|
|
|
Gateway6 manual ping period.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2008-04-08 22:41:01 +01:00
|
|
|
waitPingableBroker = mkOption {
|
|
|
|
default = true;
|
2008-07-23 15:13:27 +01:00
|
|
|
example = false;
|
|
|
|
description = "
|
|
|
|
Whether to wait until tunnel broker returns ICMP echo.
|
|
|
|
";
|
2008-04-08 22:41:01 +01:00
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
ircdHybrid = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Enable IRCD.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
serverName = mkOption {
|
|
|
|
default = "hades.arpa";
|
|
|
|
description = "
|
|
|
|
IRCD server name.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
sid = mkOption {
|
|
|
|
default = "0NL";
|
|
|
|
description = "
|
|
|
|
IRCD server unique ID in a net of servers.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
description = mkOption {
|
|
|
|
default = "Hybrid-7 IRC server.";
|
|
|
|
description = "
|
|
|
|
IRCD server description.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
rsaKey = mkOption {
|
|
|
|
default = null;
|
|
|
|
example = /root/certificates/irc.key;
|
|
|
|
description = "
|
|
|
|
IRCD server RSA key.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
certificate = mkOption {
|
|
|
|
default = null;
|
|
|
|
example = /root/certificates/irc.pem;
|
|
|
|
description = "
|
|
|
|
IRCD server SSL certificate. There are some limitations - read manual.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
adminEmail = mkOption {
|
|
|
|
default = "<bit-bucket@example.com>";
|
|
|
|
example = "<name@domain.tld>";
|
|
|
|
description = "
|
|
|
|
IRCD server administrator e-mail.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
extraIPs = mkOption {
|
|
|
|
default = [];
|
|
|
|
example = ["127.0.0.1"];
|
|
|
|
description = "
|
|
|
|
Extra IP's to bind.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
extraPort = mkOption {
|
|
|
|
default = "7117";
|
|
|
|
description = "
|
|
|
|
Extra port to avoid filtering.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
xfs = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to enable the X Font Server.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-01-28 14:55:12 +00:00
|
|
|
mysql = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Whether to enable the MySQL server.
|
|
|
|
";
|
2008-01-28 14:55:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
port = mkOption {
|
|
|
|
default = "3306";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Port of MySQL";
|
2008-01-28 14:55:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
user = mkOption {
|
2008-06-25 22:58:51 +01:00
|
|
|
default = "mysql";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "User account under which MySQL runs";
|
2008-01-28 14:55:12 +00:00
|
|
|
};
|
|
|
|
|
2008-02-07 14:02:38 +00:00
|
|
|
dataDir = mkOption {
|
2008-01-28 14:55:12 +00:00
|
|
|
default = "/var/mysql";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Location where MySQL stores its table files";
|
2008-01-28 14:55:12 +00:00
|
|
|
};
|
|
|
|
|
2008-02-07 14:02:38 +00:00
|
|
|
logError = mkOption {
|
2008-01-28 14:55:12 +00:00
|
|
|
default = "/var/log/mysql_err.log";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Location of the MySQL error logfile";
|
2008-01-28 14:55:12 +00:00
|
|
|
};
|
|
|
|
|
2008-06-25 22:58:51 +01:00
|
|
|
pidDir = mkOption {
|
|
|
|
default = "/var/run/mysql";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Location of the file which stores the PID of the MySQL server";
|
2008-01-28 14:55:12 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2008-06-06 10:13:16 +01:00
|
|
|
|
2007-12-03 04:48:31 +00:00
|
|
|
postgresql = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Whether to run PostgreSQL.
|
|
|
|
";
|
2007-12-03 04:48:31 +00:00
|
|
|
};
|
|
|
|
port = mkOption {
|
|
|
|
default = "5432";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Port for PostgreSQL.
|
|
|
|
";
|
2007-12-03 04:48:31 +00:00
|
|
|
};
|
|
|
|
logDir = mkOption {
|
|
|
|
default = "/var/log/postgresql";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Log directory for PostgreSQL.
|
|
|
|
";
|
2007-12-03 04:48:31 +00:00
|
|
|
};
|
|
|
|
dataDir = mkOption {
|
|
|
|
default = "/var/db/postgresql";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Data directory for PostgreSQL.
|
|
|
|
";
|
2007-12-03 04:48:31 +00:00
|
|
|
};
|
|
|
|
subServices = mkOption {
|
|
|
|
default = [];
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Subservices list. As it is already implememnted,
|
|
|
|
here is an interface...
|
|
|
|
";
|
2007-12-03 04:48:31 +00:00
|
|
|
};
|
2008-02-18 11:56:43 +00:00
|
|
|
authentication = mkOption {
|
|
|
|
default = ''
|
|
|
|
# Generated file; do not edit!
|
2008-06-09 16:52:02 +01:00
|
|
|
local all all ident sameuser
|
2008-02-18 11:56:43 +00:00
|
|
|
host all all 127.0.0.1/32 md5
|
|
|
|
host all all ::1/128 md5
|
|
|
|
'';
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Hosts (except localhost), who you allow to connect.
|
|
|
|
";
|
2008-02-18 11:56:43 +00:00
|
|
|
};
|
2007-12-03 04:48:31 +00:00
|
|
|
allowedHosts = mkOption {
|
|
|
|
default = [];
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Hosts (except localhost), who you allow to connect.
|
|
|
|
";
|
2007-12-03 04:48:31 +00:00
|
|
|
};
|
|
|
|
authMethod = mkOption {
|
|
|
|
default = " ident sameuser ";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
How to authorize users.
|
|
|
|
Note: ident needs absolute trust to all allowed client hosts.";
|
2007-12-03 04:48:31 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2008-06-06 10:13:16 +01:00
|
|
|
|
2008-03-03 19:28:10 +00:00
|
|
|
openfire = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Whether to enable OpenFire XMPP server.
|
|
|
|
";
|
2008-03-03 19:28:10 +00:00
|
|
|
};
|
|
|
|
usePostgreSQL = mkOption {
|
|
|
|
default = true;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Whether you use PostgreSQL service for your storage back-end.
|
|
|
|
";
|
2008-03-03 19:28:10 +00:00
|
|
|
};
|
|
|
|
};
|
2007-11-12 16:43:35 +00:00
|
|
|
|
2008-06-06 10:13:16 +01:00
|
|
|
|
2008-06-30 16:13:02 +01:00
|
|
|
postfix = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description ="
|
|
|
|
Whether to run the Postfix mail server.
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
user = mkOption {
|
|
|
|
default = "postfix";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
How to call postfix user (must be used only for postfix).
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
group = mkOption {
|
|
|
|
default = "postfix";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
How to call postfix group (must be used only for postfix).
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
setgidGroup = mkOption {
|
|
|
|
default = "postdrop";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
How to call postfix setgid group (for postdrop). Should
|
|
|
|
be uniquely used group.
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
networks = mkOption {
|
|
|
|
default = null;
|
2008-07-23 15:13:27 +01:00
|
|
|
example = ["192.168.0.1/24"];
|
|
|
|
description = "
|
|
|
|
Net masks for trusted - allowed to relay mail to third parties -
|
|
|
|
hosts. Leave empty to use mynetworks_style configuration or use
|
|
|
|
default (localhost-only).
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
networksStyle = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Name of standard way of trusted network specification to use,
|
|
|
|
leave blank if you specify it explicitly or if you want to use
|
|
|
|
default (localhost-only).
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
hostname = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description ="
|
|
|
|
Hostname to use. Leave blank to use just the hostname of machine.
|
|
|
|
It should be FQDN.
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
domain = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description ="
|
|
|
|
Domain to use. Leave blank to use hostname minus first component.
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
origin = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description ="
|
|
|
|
Origin to use in outgoing e-mail. Leave blank to use hostname.
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
destination = mkOption {
|
|
|
|
default = null;
|
|
|
|
example = ["localhost"];
|
|
|
|
description = "
|
2008-07-23 15:13:27 +01:00
|
|
|
Full (!) list of domains we deliver locally. Leave blank for
|
|
|
|
acceptable Postfix default.
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
relayDomains = mkOption {
|
|
|
|
default = null;
|
2008-07-23 15:13:27 +01:00
|
|
|
example = ["localdomain"];
|
|
|
|
description = "
|
|
|
|
List of domains we agree to relay to. Default is the same as
|
|
|
|
destination.
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
relayHost = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Mail relay for outbound mail.
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
lookupMX = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Whether relay specified is just domain whose MX must be used.
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
postmasterAlias = mkOption {
|
|
|
|
default = "root";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Who should receive postmaster e-mail.
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
rootAlias = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Who should receive root e-mail. Blank for no redirection.
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
|
|
|
extraAliases = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Additional entries to put verbatim into aliases file.
|
|
|
|
";
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
2008-06-30 22:12:02 +01:00
|
|
|
|
|
|
|
sslCert = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
SSL certificate to use.
|
|
|
|
";
|
2008-06-30 22:12:02 +01:00
|
|
|
};
|
|
|
|
sslCACert = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
SSL certificate of CA.
|
|
|
|
";
|
2008-06-30 22:12:02 +01:00
|
|
|
};
|
|
|
|
sslKey = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description ="
|
|
|
|
SSL key to use.
|
|
|
|
";
|
2008-06-30 22:12:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
recipientDelimiter = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
example = "+";
|
|
|
|
description = "
|
2008-06-30 22:12:02 +01:00
|
|
|
Delimiter for address extension: so mail to user+test can be handled by ~user/.forward+test
|
2008-07-23 15:13:27 +01:00
|
|
|
";
|
2008-06-30 22:12:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
dovecot = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Whether to enable dovecot POP3/IMAP server.";
|
2008-06-30 22:12:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
user = mkOption {
|
|
|
|
default = "dovecot";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "dovecot user name";
|
2008-06-30 22:12:02 +01:00
|
|
|
};
|
|
|
|
group = mkOption {
|
|
|
|
default = "dovecot";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "dovecot group name";
|
2008-06-30 22:12:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
sslServerCert = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Server certificate";
|
2008-06-30 22:12:02 +01:00
|
|
|
};
|
|
|
|
sslCACert = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "CA certificate used by server certificate";
|
2008-06-30 22:12:02 +01:00
|
|
|
};
|
|
|
|
sslServerKey = mkOption {
|
|
|
|
default = "";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "Server key";
|
2008-06-30 22:12:02 +01:00
|
|
|
};
|
2008-06-30 16:13:02 +01:00
|
|
|
};
|
2008-06-06 10:13:16 +01:00
|
|
|
|
2008-07-01 13:15:56 +01:00
|
|
|
bind = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Whether to enable BIND domain name server.
|
|
|
|
";
|
2008-07-01 13:15:56 +01:00
|
|
|
};
|
|
|
|
cacheNetworks = mkOption {
|
|
|
|
default = ["127.0.0.0/24"];
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
What networks are allowed to use us as a resolver.
|
|
|
|
";
|
2008-07-01 13:15:56 +01:00
|
|
|
};
|
|
|
|
blockedNetworks = mkOption {
|
|
|
|
default = [];
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
What networks are just blocked.
|
|
|
|
";
|
2008-07-01 13:15:56 +01:00
|
|
|
};
|
|
|
|
zones = mkOption {
|
|
|
|
default = [];
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
List of zones we claim authority over.
|
|
|
|
master=false means slave server; slaves means addresses
|
|
|
|
who may request zone transfer.
|
|
|
|
";
|
|
|
|
example = [{
|
|
|
|
name = "example.com";
|
|
|
|
master = false;
|
|
|
|
file = "/var/dns/example.com";
|
|
|
|
masters = ["192.168.0.1"];
|
|
|
|
slaves = [];
|
|
|
|
}];
|
2008-07-01 13:15:56 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installer = {
|
|
|
|
|
|
|
|
nixpkgsURL = mkOption {
|
|
|
|
default = "";
|
2008-05-09 16:08:43 +01:00
|
|
|
example = http://nixos.org/releases/nix/nixpkgs-0.11pre7577;
|
2007-11-09 18:12:23 +00:00
|
|
|
description = "
|
|
|
|
URL of the Nixpkgs distribution to use when building the
|
|
|
|
installation CD.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2008-08-17 02:11:57 +01:00
|
|
|
repos = {
|
|
|
|
nixos = mkOption {
|
|
|
|
default = [ { type = "svn"; } ];
|
|
|
|
example = [ { type = "svn"; url = "https://svn.nixos.org/repos/nix/nixos/branches/stdenv-updates"; target = "/etc/nixos/nixos-stdenv-updates"; }
|
|
|
|
{ type = "git"; initialize = ''git clone git://mawercer.de/nixos $target''; update = "git pull origin"; target = "/etc/nixos/nixos-git"; }
|
|
|
|
];
|
2009-01-02 19:41:39 +00:00
|
|
|
description = ''
|
|
|
|
The NixOS repository from which the system will be built.
|
|
|
|
<command>nixos-checkout</command> will update all working
|
|
|
|
copies of the given repositories,
|
|
|
|
<command>nixos-rebuild</command> will use the first item
|
|
|
|
which has the attribute <literal>default = true</literal>
|
|
|
|
falling back to the first item. The type defines the
|
|
|
|
repository tool added to the path. It also defines a "valid"
|
|
|
|
repository. If the target directory already exists and it's
|
|
|
|
not valid it will be moved to the backup location
|
|
|
|
<filename><replaceable>dir</replaceable>-date</filename>.
|
|
|
|
For svn the default target and repositories are
|
|
|
|
<filename>/etc/nixos/nixos</filename> and
|
|
|
|
<filename>https://svn.nixos.org/repos/nix/nixos/trunk</filename>.
|
|
|
|
For git repositories update is called after initialization
|
|
|
|
when the repo is initialized. The initialize code is run
|
|
|
|
from working directory dirname
|
|
|
|
<replaceable>target</replaceable> and should create the
|
|
|
|
directory
|
|
|
|
<filename><replaceable>dir</replaceable></filename>. (<command>git
|
|
|
|
clone url nixos/nixpkgs/services</command> should do) For
|
|
|
|
the executables used see <option>repoTypes</option>.
|
|
|
|
'';
|
2008-08-17 02:11:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs = mkOption {
|
|
|
|
default = [ { type = "svn"; } ];
|
|
|
|
description = "same as <option>repos.nixos</option>";
|
|
|
|
};
|
|
|
|
|
|
|
|
services = mkOption {
|
|
|
|
default = [ { type = "svn"; } ];
|
|
|
|
description = "same as <option>repos.nixos</option>";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
repoTypes = mkOption {
|
2009-01-02 19:41:39 +00:00
|
|
|
default = {
|
|
|
|
svn = { valid = "[ -d .svn ]"; env = [ pkgs.coreutils pkgs.subversion ]; };
|
|
|
|
git = { valid = "[ -d .git ]"; env = [ pkgs.coreutils pkgs.git pkgs.gnused /* FIXME: use full path to sed in nix-pull */ ]; };
|
|
|
|
};
|
|
|
|
description = ''
|
|
|
|
Defines, for each supported version control system
|
|
|
|
(e.g. <literal>git</literal>), the dependencies for the
|
|
|
|
mechanism, as well as a test used to determine whether a
|
|
|
|
directory is a checkout created by that version control
|
|
|
|
system.
|
|
|
|
'';
|
2008-08-17 02:11:57 +01:00
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
manifests = mkOption {
|
2008-05-09 16:08:43 +01:00
|
|
|
default = [http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable/MANIFEST];
|
2007-11-09 18:12:23 +00:00
|
|
|
example =
|
2008-05-09 16:08:43 +01:00
|
|
|
[ http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable/MANIFEST
|
|
|
|
http://nixos.org/releases/nixpkgs/channels/nixpkgs-stable/MANIFEST
|
2007-11-09 18:12:23 +00:00
|
|
|
];
|
|
|
|
description = "
|
|
|
|
URLs of manifests to be downloaded when you run
|
|
|
|
<command>nixos-rebuild</command> to speed up builds.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
|
|
|
|
maxJobs = mkOption {
|
|
|
|
default = 1;
|
|
|
|
example = 2;
|
|
|
|
description = "
|
|
|
|
This option defines the maximum number of jobs that Nix will try
|
|
|
|
to build in parallel. The default is 1. You should generally
|
|
|
|
set it to the number of CPUs in your system (e.g., 2 on a Athlon
|
|
|
|
64 X2).
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
useChroot = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "
|
|
|
|
If set, Nix will perform builds in a chroot-environment that it
|
|
|
|
will set up automatically for each build. This prevents
|
|
|
|
impurities in builds by disallowing access to dependencies
|
|
|
|
outside of the Nix store.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
extraOptions = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "
|
|
|
|
gc-keep-outputs = true
|
|
|
|
gc-keep-derivations = true
|
|
|
|
";
|
|
|
|
description = "
|
|
|
|
This option allows to append lines to nix.conf.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-15 17:16:16 +00:00
|
|
|
distributedBuilds = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to distribute builds to the machines listed in
|
|
|
|
<option>nix.buildMachines</option>.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildMachines = mkOption {
|
|
|
|
example = [
|
|
|
|
{ hostName = "voila.labs.cs.uu.nl";
|
|
|
|
sshUser = "nix";
|
|
|
|
sshKey = "/root/.ssh/id_buildfarm";
|
|
|
|
system = "powerpc-darwin";
|
|
|
|
maxJobs = 1;
|
|
|
|
}
|
|
|
|
{ hostName = "linux64.example.org";
|
|
|
|
sshUser = "buildfarm";
|
|
|
|
sshKey = "/root/.ssh/id_buildfarm";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
maxJobs = 2;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
description = "
|
|
|
|
This option lists the machines to be used if distributed
|
|
|
|
builds are enabled (see
|
|
|
|
<option>nix.distributedBuilds</option>). Nix will perform
|
|
|
|
derivations on those machines via SSh by copying the inputs to
|
|
|
|
the Nix store on the remote machine, starting the build, then
|
|
|
|
copying the output back to the local Nix store. Each element
|
|
|
|
of the list should be an attribute set containing the
|
|
|
|
machine's host name (<varname>hostname</varname>), the user
|
|
|
|
name to be used for the SSH connection
|
|
|
|
(<varname>sshUser</varname>), the Nix system type
|
|
|
|
(<varname>system</varname>, e.g.,
|
|
|
|
<literal>\"i686-linux\"</literal>), the maximum number of jobs
|
|
|
|
to be run in parallel on that machine
|
|
|
|
(<varname>maxJobs</varname>), and the path to the SSH private
|
|
|
|
key to be used to connect (<varname>sshKey</varname>). The
|
|
|
|
SSH private key should not have a passphrase, and the
|
|
|
|
corresponding public key should be added to
|
2007-11-21 14:39:52 +00:00
|
|
|
<filename>~<replaceable>sshUser</replaceable>/authorized_keys</filename>
|
2007-11-15 17:16:16 +00:00
|
|
|
on the remote machine.
|
|
|
|
";
|
|
|
|
};
|
2009-02-22 16:06:27 +00:00
|
|
|
|
|
|
|
proxy = mkOption {
|
|
|
|
default = "";
|
|
|
|
description = "
|
|
|
|
This option specifies the proxy to use for fetchurl. The real effect
|
|
|
|
is just exporting http_proxy, https_proxy and ftp_proxy with that
|
|
|
|
value.
|
|
|
|
";
|
|
|
|
example = "http://127.0.0.1:3128";
|
|
|
|
};
|
2007-11-15 17:16:16 +00:00
|
|
|
|
2008-11-18 18:00:09 +00:00
|
|
|
# Environment variables for running Nix.
|
|
|
|
envVars = mkOption {
|
|
|
|
internal = true;
|
|
|
|
default = "";
|
|
|
|
description = "
|
|
|
|
Define the environment variables used by nix to
|
|
|
|
";
|
|
|
|
|
|
|
|
merge = pkgs.lib.mergeStringOption;
|
|
|
|
|
|
|
|
# other option should be used to define the content instead of using
|
|
|
|
# the apply function.
|
|
|
|
apply = conf: ''
|
|
|
|
export NIX_CONF_DIR=/nix/etc/nix
|
|
|
|
|
|
|
|
# Enable the copy-from-other-stores substituter, which allows builds
|
|
|
|
# to be sped up by copying build results from remote Nix stores. To
|
|
|
|
# do this, mount the remote file system on a subdirectory of
|
|
|
|
# /var/run/nix/remote-stores.
|
|
|
|
export NIX_OTHER_STORES=/var/run/nix/remote-stores/*/nix
|
|
|
|
|
|
|
|
'' + # */
|
|
|
|
(if config.nix.distributedBuilds then
|
|
|
|
''
|
|
|
|
export NIX_BUILD_HOOK=${config.environment.nix}/libexec/nix/build-remote.pl
|
|
|
|
export NIX_REMOTE_SYSTEMS=/etc/nix.machines
|
|
|
|
export NIX_CURRENT_LOAD=/var/run/nix/current-load
|
|
|
|
''
|
2009-02-22 16:06:27 +00:00
|
|
|
else "")
|
|
|
|
+
|
|
|
|
(if config.nix.proxy != "" then
|
|
|
|
''
|
|
|
|
export http_proxy=${config.nix.proxy}
|
|
|
|
export https_proxy=${config.nix.proxy}
|
|
|
|
export ftp_proxy=${config.nix.proxy}
|
|
|
|
''
|
|
|
|
else "")
|
|
|
|
+ conf;
|
2008-11-18 18:00:09 +00:00
|
|
|
};
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2007-08-16 16:09:06 +01:00
|
|
|
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
security = {
|
|
|
|
|
|
|
|
setuidPrograms = mkOption {
|
2008-07-25 14:33:10 +01:00
|
|
|
default = [
|
|
|
|
"passwd" "su" "crontab" "ping" "ping6"
|
2008-11-07 13:38:46 +00:00
|
|
|
"fusermount" "wodim" "cdrdao" "growisofs"
|
2008-07-25 14:33:10 +01:00
|
|
|
];
|
2007-11-09 18:12:23 +00:00
|
|
|
description = "
|
2008-08-10 00:26:37 +01:00
|
|
|
Only the programs from system path listed her will be made setuid root
|
|
|
|
(through a wrapper program). It's better to set
|
2007-11-09 18:12:23 +00:00
|
|
|
<option>security.extraSetuidPrograms</option>.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
extraSetuidPrograms = mkOption {
|
|
|
|
default = [];
|
|
|
|
example = ["fusermount"];
|
|
|
|
description = "
|
|
|
|
This option lists additional programs that must be made setuid
|
|
|
|
root.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2008-06-30 16:13:02 +01:00
|
|
|
setuidOwners = mkOption {
|
|
|
|
default = [];
|
|
|
|
example = [{
|
|
|
|
program = "sendmail";
|
2008-07-23 15:13:27 +01:00
|
|
|
owner = "nodody";
|
|
|
|
group = "postdrop";
|
|
|
|
setuid = false;
|
|
|
|
setgid = true;
|
2008-06-30 16:13:02 +01:00
|
|
|
}];
|
|
|
|
description = ''
|
2008-08-10 06:44:25 +01:00
|
|
|
List of non-trivial setuid programs from system path, like Postfix sendmail. Default
|
2008-07-23 15:13:27 +01:00
|
|
|
should probably be nobody:nogroup:false:false - if you are bothering
|
|
|
|
doing anything with a setuid program, "root.root u+s g-s" is not what
|
|
|
|
you are aiming at..
|
2008-06-30 16:13:02 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2008-03-04 16:06:33 +00:00
|
|
|
seccureKeys = {
|
|
|
|
public = mkOption {
|
|
|
|
default = /var/elliptic-keys/public;
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Public key. Make it path argument, so it is copied into store and
|
|
|
|
hashed.
|
2008-07-11 09:01:09 +01:00
|
|
|
|
2008-07-23 15:13:27 +01:00
|
|
|
The key is used to encrypt Gateway 6 configuration in store, as it
|
|
|
|
contains a password for external service. Unfortunately,
|
|
|
|
derivation file should be protected by other means. For example,
|
|
|
|
nix-http-export.cgi will happily export any non-derivation path,
|
|
|
|
but not a derivation.
|
|
|
|
";
|
2008-03-04 16:06:33 +00:00
|
|
|
};
|
|
|
|
private = mkOption {
|
|
|
|
default = "/var/elliptic-keys/private";
|
2008-07-23 15:13:27 +01:00
|
|
|
description = "
|
|
|
|
Private key. Make it string argument, so it is not copied into store.
|
|
|
|
";
|
2008-03-04 16:06:33 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2007-01-16 16:09:43 +00:00
|
|
|
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
users = {
|
2007-01-16 16:09:43 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
ldap = {
|
2007-01-16 16:09:43 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
Whether to enable authentication against an LDAP server.
|
|
|
|
";
|
|
|
|
};
|
2007-01-22 16:42:29 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
server = mkOption {
|
|
|
|
example = "ldap://ldap.example.org/";
|
|
|
|
description = "
|
|
|
|
The URL of the LDAP server.
|
|
|
|
";
|
|
|
|
};
|
2007-01-22 16:42:29 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
base = mkOption {
|
|
|
|
example = "dc=example,dc=org";
|
|
|
|
description = "
|
|
|
|
The distinguished name of the search base.
|
|
|
|
";
|
|
|
|
};
|
2007-09-25 20:00:20 +01:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
useTLS = mkOption {
|
|
|
|
default = false;
|
|
|
|
description = "
|
|
|
|
If enabled, use TLS (encryption) over an LDAP (port 389)
|
|
|
|
connection. The alternative is to specify an LDAPS server (port
|
|
|
|
636) in <option>users.ldap.server</option> or to forego
|
|
|
|
security.
|
|
|
|
";
|
|
|
|
};
|
2007-03-01 00:36:00 +00:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2007-04-04 14:47:54 +01:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2007-04-04 14:47:54 +01:00
|
|
|
|
2007-04-04 18:10:38 +01:00
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
i18n = {
|
|
|
|
|
|
|
|
defaultLocale = mkOption {
|
|
|
|
default = "en_US.UTF-8";
|
|
|
|
example = "nl_NL.UTF-8";
|
|
|
|
description = "
|
|
|
|
The default locale. It determines the language for program
|
|
|
|
messages, the format for dates and times, sort order, and so on.
|
|
|
|
It also determines the character set, such as UTF-8.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
consoleFont = mkOption {
|
|
|
|
default = "lat9w-16";
|
|
|
|
example = "LatArCyrHeb-16";
|
|
|
|
description = "
|
|
|
|
The font used for the virtual consoles. Leave empty to use
|
|
|
|
whatever the <command>setfont</command> program considers the
|
|
|
|
default font.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
consoleKeyMap = mkOption {
|
|
|
|
default = "us";
|
|
|
|
example = "fr";
|
|
|
|
description = "
|
|
|
|
The keyboard mapping table for the virtual consoles.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
environment = {
|
|
|
|
|
2007-12-01 20:44:27 +00:00
|
|
|
pathsToLink = mkOption {
|
2008-03-26 16:23:52 +00:00
|
|
|
default = ["/bin" "/sbin" "/lib" "/share" "/man" "/info"];
|
2007-12-01 20:44:27 +00:00
|
|
|
example = ["/"];
|
|
|
|
description = "
|
2008-03-26 16:23:52 +00:00
|
|
|
Lists directories to be symlinked in `/var/run/current-system/sw'.
|
2007-12-01 20:44:27 +00:00
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2008-01-22 17:55:57 +00:00
|
|
|
cleanStart = mkOption {
|
|
|
|
default = false;
|
|
|
|
example = true;
|
|
|
|
description = "
|
|
|
|
There are some times when you want really small system for specific
|
2008-07-23 15:13:27 +01:00
|
|
|
purpose and do not want default package list. Setting
|
|
|
|
<varname>cleanStart</varname> to <literal>true</literal> allows you
|
|
|
|
to create a system with empty path - only extraPackages will be
|
|
|
|
included.
|
2008-01-22 17:55:57 +00:00
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
extraPackages = mkOption {
|
2008-08-08 19:57:07 +01:00
|
|
|
default = [];
|
|
|
|
example = [pkgs.firefox pkgs.thunderbird];
|
2007-11-09 18:12:23 +00:00
|
|
|
description = "
|
|
|
|
This option allows you to add additional packages to the system
|
|
|
|
path. These packages are automatically available to all users,
|
|
|
|
and they are automatically updated every time you rebuild the
|
|
|
|
system configuration. (The latter is the main difference with
|
|
|
|
installing them in the default profile,
|
|
|
|
<filename>/nix/var/nix/profiles/default</filename>. The value
|
|
|
|
of this option must be a function that returns a list of
|
|
|
|
packages. The function will be called with the Nix Packages
|
|
|
|
collection as its argument for convenience.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2007-11-13 15:51:24 +00:00
|
|
|
nix = mkOption {
|
2008-08-08 19:57:07 +01:00
|
|
|
default = pkgs.nixUnstable;
|
|
|
|
example = pkgs.nixCustomFun /root/nix.tar.gz;
|
2009-01-25 15:49:12 +00:00
|
|
|
merge = mergeOneOption;
|
2008-01-02 15:31:04 +00:00
|
|
|
description = "
|
2008-01-02 13:05:24 +00:00
|
|
|
Use non-default Nix easily. Be careful, though, not to break everything.
|
2008-01-02 15:31:04 +00:00
|
|
|
";
|
2007-11-13 15:51:24 +00:00
|
|
|
};
|
|
|
|
|
2008-01-15 16:05:51 +00:00
|
|
|
checkConfigurationOptions = mkOption {
|
2008-03-03 23:30:49 +00:00
|
|
|
default = true;
|
|
|
|
example = false;
|
2008-01-15 16:05:51 +00:00
|
|
|
description = "
|
|
|
|
If all configuration options must be checked. Non-existing options fail build.
|
|
|
|
";
|
|
|
|
};
|
2008-06-12 00:06:53 +01:00
|
|
|
|
|
|
|
unixODBCDrivers = mkOption {
|
|
|
|
default = pkgs : [];
|
|
|
|
example = "pkgs : map (x : x.ini) (with pkgs.unixODBCDrivers; [ mysql psql psqlng ] )";
|
|
|
|
description = "specifies unix odbc drivers to be registered at /etc/odbcinst.ini";
|
|
|
|
};
|
|
|
|
|
2007-11-09 18:12:23 +00:00
|
|
|
};
|
2007-12-20 11:36:30 +00:00
|
|
|
|
|
|
|
nesting = {
|
2008-01-02 13:05:24 +00:00
|
|
|
children = mkOption {
|
|
|
|
default = [];
|
2008-01-02 15:31:04 +00:00
|
|
|
description = "
|
2008-01-02 13:05:24 +00:00
|
|
|
Additional configurations to build.
|
2008-01-02 15:31:04 +00:00
|
|
|
";
|
2008-01-02 13:05:24 +00:00
|
|
|
};
|
2007-12-20 11:36:30 +00:00
|
|
|
};
|
2007-11-09 18:12:23 +00:00
|
|
|
|
2008-10-01 16:56:01 +01:00
|
|
|
passthru = mkOption {
|
|
|
|
default = {};
|
|
|
|
description = "
|
|
|
|
Additional parameters. Ignored. When you want to be sure that
|
|
|
|
/etc/nixos/nixos -A config.passthru.* is that same thing the
|
|
|
|
system rebuild will use.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
2008-08-27 15:01:17 +01:00
|
|
|
require = [
|
2009-01-02 16:07:30 +00:00
|
|
|
# boot (is it the right place ?)
|
2009-01-25 15:48:48 +00:00
|
|
|
(import ../system/kernel.nix)
|
2009-01-02 16:07:30 +00:00
|
|
|
(import ../boot/boot-stage-2.nix)
|
2009-01-02 16:07:34 +00:00
|
|
|
(import ../installer/grub.nix)
|
2009-01-02 16:07:30 +00:00
|
|
|
|
2008-11-18 18:00:09 +00:00
|
|
|
# system
|
2009-01-02 16:06:46 +00:00
|
|
|
(import ../system/system-options.nix)
|
|
|
|
(import ../system/activate-configuration.nix)
|
2008-11-18 18:00:09 +00:00
|
|
|
(import ../upstart-jobs/default.nix)
|
|
|
|
|
2009-01-02 16:07:15 +00:00
|
|
|
# security
|
|
|
|
(import ../system/sudo.nix)
|
|
|
|
|
2009-01-02 16:06:52 +00:00
|
|
|
# environment
|
|
|
|
(import ../etc/default.nix)
|
|
|
|
|
2009-01-02 16:07:01 +00:00
|
|
|
# users
|
|
|
|
(import ../system/users-groups.nix)
|
|
|
|
|
2008-11-08 21:45:58 +00:00
|
|
|
# newtworking
|
|
|
|
(import ../upstart-jobs/dhclient.nix)
|
2008-11-09 16:44:43 +00:00
|
|
|
|
2008-11-08 21:45:58 +00:00
|
|
|
# hardware
|
2008-08-27 15:01:17 +01:00
|
|
|
(import ../upstart-jobs/pcmcia.nix)
|
2008-11-09 16:44:43 +00:00
|
|
|
|
|
|
|
# services
|
2008-11-23 01:28:58 +00:00
|
|
|
(import ../upstart-jobs/avahi-daemon.nix)
|
2009-01-02 16:07:10 +00:00
|
|
|
(import ../upstart-jobs/atd.nix)
|
2008-11-23 01:28:58 +00:00
|
|
|
(import ../upstart-jobs/dbus.nix)
|
2008-11-23 01:28:52 +00:00
|
|
|
(import ../upstart-jobs/hal.nix)
|
2008-11-23 01:28:45 +00:00
|
|
|
(import ../upstart-jobs/gpm.nix)
|
2008-11-23 01:28:34 +00:00
|
|
|
(import ../upstart-jobs/nagios/default.nix)
|
2009-01-25 15:49:08 +00:00
|
|
|
(import ../upstart-jobs/xserver/default.nix)
|
2008-11-18 18:00:21 +00:00
|
|
|
(import ../upstart-jobs/zabbix-agent.nix)
|
2008-11-23 01:28:25 +00:00
|
|
|
(import ../upstart-jobs/zabbix-server.nix)
|
2008-11-18 18:00:15 +00:00
|
|
|
(import ../upstart-jobs/disnix.nix)
|
2008-11-09 16:44:43 +00:00
|
|
|
(import ../upstart-jobs/cron.nix)
|
2009-01-02 19:41:39 +00:00
|
|
|
(import ../upstart-jobs/fcron.nix)
|
2008-11-09 16:44:53 +00:00
|
|
|
(import ../upstart-jobs/cron/locate.nix)
|
2009-02-22 16:06:42 +00:00
|
|
|
(import ../upstart-jobs/manual.nix)
|
2009-02-22 16:06:47 +00:00
|
|
|
(import ../upstart-jobs/rogue.nix)
|
2009-02-22 16:06:52 +00:00
|
|
|
(import ../upstart-jobs/guest-users.nix)
|
2009-02-22 16:07:42 +00:00
|
|
|
(import ../upstart-jobs/pulseaudio.nix)
|
2008-11-23 01:29:05 +00:00
|
|
|
|
2009-01-02 16:07:39 +00:00
|
|
|
# fonts
|
|
|
|
(import ../system/fonts.nix)
|
|
|
|
|
2008-11-23 01:29:05 +00:00
|
|
|
# sound
|
|
|
|
(import ../upstart-jobs/alsa.nix)
|
2008-08-27 15:01:17 +01:00
|
|
|
];
|
2007-11-09 18:12:23 +00:00
|
|
|
}
|