Add lots of missing option types

wip/yesman
Eelco Dolstra 11 years ago
parent d882e19662
commit 408b8b5725
  1. 1
      nixos/modules/config/gnu.nix
  2. 17
      nixos/modules/config/i18n.nix
  3. 2
      nixos/modules/config/networking.nix
  4. 8
      nixos/modules/config/no-x-libs.nix
  5. 4
      nixos/modules/config/power-management.nix
  6. 12
      nixos/modules/config/pulseaudio.nix
  7. 4
      nixos/modules/config/users-groups.nix
  8. 10
      nixos/modules/hardware/all-firmware.nix
  9. 2
      nixos/modules/hardware/pcmcia.nix
  10. 8
      nixos/modules/misc/check-config.nix
  11. 3
      nixos/modules/misc/crashdump.nix
  12. 2
      nixos/modules/misc/ids.nix
  13. 5
      nixos/modules/misc/locate.nix
  14. 1
      nixos/modules/misc/passthru.nix
  15. 2
      nixos/modules/programs/shadow.nix
  16. 8
      nixos/modules/programs/ssh.nix
  17. 1
      nixos/modules/rename.nix
  18. 2
      nixos/modules/security/pam.nix
  19. 1
      nixos/modules/security/pam_usb.nix
  20. 3
      nixos/modules/security/polkit.nix
  21. 1
      nixos/modules/security/rngd.nix
  22. 1
      nixos/modules/security/rtkit.nix
  23. 5
      nixos/modules/security/setuid-wrappers.nix
  24. 3
      nixos/modules/security/sudo.nix
  25. 17
      nixos/modules/services/databases/postgresql.nix
  26. 4
      nixos/modules/services/hardware/acpid.nix
  27. 1
      nixos/modules/services/hardware/bluetooth.nix
  28. 29
      nixos/modules/services/hardware/sane.nix
  29. 1
      nixos/modules/services/hardware/udev.nix
  30. 1
      nixos/modules/services/hardware/udisks.nix
  31. 1
      nixos/modules/services/hardware/udisks2.nix
  32. 1
      nixos/modules/services/hardware/upower.nix
  33. 4
      nixos/modules/services/logging/syslogd.nix
  34. 32
      nixos/modules/services/misc/nix-daemon.nix
  35. 4
      nixos/modules/services/misc/nixos-manual.nix
  36. 2
      nixos/modules/services/misc/rogue.nix
  37. 6
      nixos/modules/services/networking/firewall.nix
  38. 11
      nixos/modules/services/networking/nat.nix
  39. 1
      nixos/modules/services/networking/rpcbind.nix
  40. 15
      nixos/modules/services/networking/ssh/sshd.nix
  41. 11
      nixos/modules/services/printing/cupsd.nix
  42. 11
      nixos/modules/services/scheduling/atd.nix
  43. 22
      nixos/modules/services/scheduling/cron.nix
  44. 17
      nixos/modules/services/scheduling/fcron.nix
  45. 1
      nixos/modules/services/system/dbus.nix
  46. 1
      nixos/modules/services/system/nscd.nix
  47. 2
      nixos/modules/services/ttys/agetty.nix
  48. 2
      nixos/modules/services/ttys/gpm.nix
  49. 5
      nixos/modules/services/x11/desktop-managers/default.nix
  50. 4
      nixos/modules/services/x11/desktop-managers/kde4.nix
  51. 2
      nixos/modules/services/x11/desktop-managers/xfce.nix
  52. 7
      nixos/modules/services/x11/display-managers/default.nix
  53. 9
      nixos/modules/services/x11/display-managers/kdm.nix
  54. 19
      nixos/modules/services/x11/display-managers/slim.nix
  55. 1
      nixos/modules/services/x11/window-managers/default.nix
  56. 13
      nixos/modules/services/x11/xfs.nix
  57. 33
      nixos/modules/services/x11/xserver.nix
  58. 4
      nixos/modules/system/activation/top-level.nix
  59. 25
      nixos/modules/system/boot/kernel.nix
  60. 2
      nixos/modules/system/boot/loader/grub/grub.nix
  61. 1
      nixos/modules/system/boot/modprobe.nix
  62. 28
      nixos/modules/system/boot/stage-1.nix
  63. 6
      nixos/modules/system/boot/stage-2.nix
  64. 4
      nixos/modules/system/etc/etc.nix
  65. 6
      nixos/modules/tasks/cpu-freq.nix
  66. 2
      nixos/tests/bittorrent.nix
  67. 2
      nixos/tests/nat.nix

@ -5,6 +5,7 @@ with pkgs.lib;
{
options = {
gnu = mkOption {
type = types.bool;
default = false;
description =
'' When enabled, GNU software is chosen by default whenever a there is

@ -18,16 +18,18 @@ in
i18n = {
defaultLocale = mkOption {
type = types.str;
default = "en_US.UTF-8";
example = "nl_NL.UTF-8";
description = "
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.
";
'';
};
supportedLocales = mkOption {
type = types.listOf types.str;
default = ["all"];
example = ["en_US.UTF-8/UTF-8" "nl_NL.UTF-8/UTF-8" "nl_NL/ISO-8859-1"];
description = ''
@ -40,22 +42,23 @@ in
};
consoleFont = mkOption {
type = types.str;
default = "lat9w-16";
example = "LatArCyrHeb-16";
description = "
description = ''
The font used for the virtual consoles. Leave empty to use
whatever the <command>setfont</command> program considers the
default font.
";
'';
};
consoleKeyMap = mkOption {
type = types.str;
default = "us";
example = "fr";
description = "
description = ''
The keyboard mapping table for the virtual consoles.
";
type = types.str;
'';
};
};

@ -15,6 +15,7 @@ in
options = {
networking.extraHosts = pkgs.lib.mkOption {
type = types.lines;
default = "";
example = "192.168.0.1 lanlocalhost";
description = ''
@ -23,6 +24,7 @@ in
};
networking.dnsSingleRequest = pkgs.lib.mkOption {
type = types.bool;
default = false;
description = ''
Recent versions of glibc will issue both ipv4 (A) and ipv6 (AAAA)

@ -1,10 +1,12 @@
{ config, pkgs, ... }:
with pkgs.lib;
{
options = {
environment.noXlibs = pkgs.lib.mkOption {
environment.noXlibs = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
Switch off the options in the default configuration that require X libraries.
Currently this includes: ssh X11 forwarding, dbus, fonts.enableCoreFonts,
@ -13,7 +15,7 @@
};
};
config = pkgs.lib.mkIf config.environment.noXlibs {
config = mkIf config.environment.noXlibs {
programs.ssh.setXAuthLocation = false;
fonts = {
enableCoreFonts = false;

@ -17,6 +17,7 @@ in
powerManagement = {
enable = mkOption {
type = types.bool;
default = true;
description =
''
@ -26,11 +27,13 @@ in
};
resumeCommands = mkOption {
type = types.lines;
default = "";
description = "Commands executed after the system resumes from suspend-to-RAM.";
};
powerUpCommands = mkOption {
type = types.lines;
default = "";
example = "${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda";
description =
@ -42,6 +45,7 @@ in
};
powerDownCommands = mkOption {
type = types.lines;
default = "";
example = "${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda";
description =

@ -46,6 +46,7 @@ in {
hardware.pulseaudio = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the PulseAudio sound server.
@ -72,12 +73,13 @@ in {
The path to the configuration the PulseAudio server
should use. By default, the "default.pa" configuration
from the PulseAudio distribution is used.
'';
'';
};
package = mkOption {
type = types.path;
default = pulseaudio;
example = "pulseaudio.override { jackaudioSupport = true; }";
example = literalExample "pulseaudio.override { jackaudioSupport = true; }";
description = ''
The PulseAudio derivation to use. This can be used to enable
features (such as JACK support) that are not enabled in the
@ -125,9 +127,9 @@ in {
description = "PulseAudio system service user";
home = pulseRuntimePath;
};
users.extraGroups.pulse.gid = gid;
systemd.services.pulseaudio = {
description = "PulseAudio system-wide server";
wantedBy = [ "sound.target" ];

@ -35,7 +35,7 @@ let
};
extraGroups = mkOption {
type = types.listOf types.string;
type = types.listOf types.str;
default = [];
description = "The user's auxiliary groups.";
};
@ -65,7 +65,7 @@ let
};
password = mkOption {
type = with types; uniq (nullOr string);
type = with types; uniq (nullOr str);
default = null;
description = "The user's password. If undefined, no password is set for the user. Warning: do not set confidential information here because this data would be readable by all. This option should only be used for public account such as guest.";
};

@ -1,4 +1,6 @@
{pkgs, config, ...}:
{ config, pkgs, ... }:
with pkgs.lib;
{
@ -6,9 +8,9 @@
options = {
hardware.enableAllFirmware = pkgs.lib.mkOption {
hardware.enableAllFirmware = mkOption {
default = false;
type = pkgs.lib.types.bool;
type = types.bool;
description = ''
Turn on this option if you want to enable all the firmware shipped with Debian/Ubuntu.
'';
@ -19,7 +21,7 @@
###### implementation
config = pkgs.lib.mkIf config.hardware.enableAllFirmware {
config = mkIf config.hardware.enableAllFirmware {
hardware.firmware = [ "${pkgs.firmwareLinuxNonfree}/lib/firmware" ];
};

@ -36,7 +36,7 @@ in
config = mkOption {
default = null;
description = ''
Path to the configuration file which map the memory, irq
Path to the configuration file which maps the memory, IRQs
and ports used by the PCMCIA hardware.
'';
};

@ -1,10 +1,12 @@
{pkgs, ...}:
{ pkgs, ... }:
with pkgs.lib;
{
options = {
environment.checkConfigurationOptions = pkgs.lib.mkOption {
environment.checkConfigurationOptions = mkOption {
type = types.bool;
default = true;
example = false;
description = ''
Whether to check the validity of the entire configuration.
'';

@ -14,8 +14,8 @@ in
boot = {
crashDump = {
enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
If enabled, NixOS will set up a kernel that will
boot on crash, and leave the user to a stage1 debug1devices
@ -35,6 +35,7 @@ in
'';
};
kernelParams = mkOption {
type = types.listOf types.str;
default = [ "debug1devices" ];
description = ''
Parameters that will be passed to the kernel kexec-ed on crash.

@ -7,12 +7,14 @@
options = {
ids.uids = pkgs.lib.mkOption {
internal = true;
description = ''
The user IDs used in NixOS.
'';
};
ids.gids = pkgs.lib.mkOption {
internal = true;
description = ''
The group IDs used in NixOS.
'';

@ -17,8 +17,8 @@ in
services.locate = {
enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
If enabled, NixOS will periodically update the database of
files used by the <command>locate</command> command.
@ -26,11 +26,12 @@ in
};
period = mkOption {
type = types.str;
default = "15 02 * * *";
description = ''
This option defines (in the format used by cron) when the
locate database is updated.
The default is to update at 02:15 (at night) every day.
The default is to update at 02:15 at night every day.
'';
};

@ -6,6 +6,7 @@
{
options = {
passthru = pkgs.lib.mkOption {
visible = false;
description = ''
This attribute set will be exported as a system attribute.
You can put whatever you want here.

@ -48,7 +48,7 @@ in
Rather, it should be the path of a symlink that points to the
actual shell in the Nix store.
'';
type = types.uniq types.path;
type = types.path;
};
};

@ -16,6 +16,7 @@ in
programs.ssh = {
forwardX11 = mkOption {
type = types.bool;
default = false;
description = ''
Whether to request X11 forwarding on outgoing connections by default.
@ -29,18 +30,21 @@ in
};
setXAuthLocation = mkOption {
type = types.bool;
default = true;
description = ''
Whether to set the path to <command>xauth</command> for X11-forwarded connections.
Pulls in X11 dependency.
This causes a dependency on X11 packages.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration text appended to <filename>ssh_config</filename>.
See the ssh_config(5) man page for help.
See <citerefentry><refentrytitle>ssh_config</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for help.
'';
};
};

@ -93,6 +93,7 @@ in zipModules ([]
++ obsolete [ "boot" "grubSplashImage" ] [ "boot" "loader" "grub" "splashImage" ]
++ obsolete [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ]
++ obsolete [ "boot" "extraKernelParams" ] [ "boot" "kernelParams" ]
# OpenSSH
++ obsolete [ "services" "sshd" "ports" ] [ "services" "openssh" "ports" ]

@ -133,7 +133,7 @@ let
};
text = mkOption {
type = types.nullOr types.string;
type = types.nullOr types.lines;
description = "Contents of the PAM service file.";
};

@ -17,6 +17,7 @@ in
security.pam.usb = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Enable USB login for all login systems that support it. For

@ -13,11 +13,13 @@ in
options = {
security.polkit.enable = mkOption {
type = types.bool;
default = true;
description = "Whether to enable PolKit.";
};
security.polkit.permissions = mkOption {
type = types.lines;
default = "";
example =
''
@ -49,6 +51,7 @@ in
};
security.polkit.adminIdentities = mkOption {
type = types.str;
default = "unix-user:0;unix-group:wheel";
example = "";
description =

@ -5,6 +5,7 @@ with pkgs.lib;
{
options = {
security.rngd.enable = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable the rng daemon, which adds entropy from

@ -10,6 +10,7 @@ with pkgs.lib;
options = {
security.rtkit.enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the RealtimeKit system service, which hands

@ -25,7 +25,9 @@ in
options = {
security.setuidPrograms = mkOption {
type = types.listOf types.str;
default = [];
example = ["passwd"];
description = ''
The Nix store cannot contain setuid/setgid programs directly.
For this reason, NixOS can automatically generate wrapper
@ -36,6 +38,7 @@ in
};
security.setuidOwners = mkOption {
type = types.listOf types.attrs;
default = [];
example =
[ { program = "sendmail";
@ -53,6 +56,8 @@ in
};
security.wrapperDir = mkOption {
internal = true;
type = types.path;
default = "/var/setuid-wrappers";
description = ''
This option defines the path to the setuid wrappers. It

@ -17,6 +17,7 @@ in
options = {
security.sudo.enable = mkOption {
type = types.bool;
default = true;
description =
''
@ -26,6 +27,7 @@ in
};
security.sudo.wheelNeedsPassword = mkOption {
type = types.bool;
default = true;
description =
''
@ -35,6 +37,7 @@ in
};
security.sudo.configFile = mkOption {
type = types.lines;
# Note: if syntax errors are detected in this file, the NixOS
# configuration will fail to build.
description =

@ -46,6 +46,7 @@ in
services.postgresql = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run PostgreSQL.
@ -53,6 +54,7 @@ in
};
package = mkOption {
type = types.path;
example = literalExample "pkgs.postgresql92";
description = ''
PostgreSQL package to use.
@ -60,6 +62,7 @@ in
};
port = mkOption {
type = types.int;
default = "5432";
description = ''
Port for PostgreSQL.
@ -67,6 +70,7 @@ in
};
dataDir = mkOption {
type = types.path;
default = "/var/db/postgresql";
description = ''
Data directory for PostgreSQL.
@ -74,6 +78,7 @@ in
};
authentication = mkOption {
type = types.lines;
default = "";
description = ''
Defines how users authenticate themselves to the server.
@ -81,6 +86,7 @@ in
};
identMap = mkOption {
type = types.lines;
default = "";
description = ''
Defines the mapping from system users to database users.
@ -88,14 +94,15 @@ in
};
initialScript = mkOption {
default = null;
type = types.nullOr types.path;
default = null;
description = ''
A file containing SQL statements to execute on first startup.
'';
};
enableTCPIP = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run PostgreSQL with -i flag to enable TCP/IP connections.
@ -103,8 +110,9 @@ in
};
extraPlugins = mkOption {
type = types.listOf types.path;
default = [];
example = "pkgs.postgis"; # of course don't use a string here!
example = literalExample "pkgs.postgis";
description = ''
When this list contains elements a new store path is created.
PostgreSQL and the elments are symlinked into it. Then pg_config,
@ -118,15 +126,16 @@ in
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = "Additional text to be appended to <filename>postgresql.conf</filename>.";
};
recoveryConfig = mkOption {
type = types.nullOr types.lines;
default = null;
type = types.nullOr types.string;
description = ''
Values to put into recovery.conf file.
Contents of the <filename>recovery.conf</filename> file.
'';
};
};

@ -66,21 +66,25 @@ in
services.acpid = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the ACPI daemon.";
};
powerEventCommands = mkOption {
type = types.lines;
default = "";
description = "Shell commands to execute on a button/power.* event.";
};
lidEventCommands = mkOption {
type = types.lines;
default = "";
description = "Shell commands to execute on a button/lid.* event.";
};
acEventCommands = mkOption {
type = types.lines;
default = "";
description = "Shell commands to execute on an ac_adapter.* event.";
};

@ -9,6 +9,7 @@ with pkgs.lib;
options = {
hardware.bluetooth.enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable support for Bluetooth.";
};

@ -2,6 +2,12 @@
with pkgs.lib;
let
pkg = if config.hardware.sane.snapshot then pkgs.saneBackendsGit else pkgs.saneBackends;
in
{
###### interface
@ -9,11 +15,13 @@ with pkgs.lib;
options = {
hardware.sane.enable = mkOption {
type = types.bool;
default = false;
description = "Enable support for SANE scanners.";
};
hardware.sane.snapshot = mkOption {
type = types.bool;
default = false;
description = "Use a development snapshot of SANE scanner drivers.";
};
@ -23,18 +31,13 @@ with pkgs.lib;
###### implementation
config = let pkg = if config.hardware.sane.snapshot
then pkgs.saneBackendsGit
else pkgs.saneBackends;
in mkIf config.hardware.sane.enable {
environment.systemPackages = [ pkg ];
services.udev.packages = [ pkg ];
users.extraGroups = singleton {
name = "scanner";
gid = config.ids.gids.scanner;
};
};
config = mkIf config.hardware.sane.enable {
environment.systemPackages = [ pkg ];
services.udev.packages = [ pkg ];
users.extraGroups."scanner".gid = config.ids.gids.scanner;
};
}

@ -114,6 +114,7 @@ in
options = {
boot.hardwareScan = mkOption {
type = types.bool;
default = true;
description = ''
Whether to try to load kernel modules for all detected hardware.

@ -13,6 +13,7 @@ with pkgs.lib;
services.udisks = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable Udisks, a DBus service that allows

@ -13,6 +13,7 @@ with pkgs.lib;
services.udisks2 = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable Udisks, a DBus service that allows

@ -13,6 +13,7 @@ with pkgs.lib;
services.upower = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable Upower, a DBus service that provides power

@ -55,7 +55,7 @@ in
};
defaultConfig = mkOption {
type = types.string;
type = types.lines;
default = defaultConf;
description = ''
The default <filename>syslog.conf</filename> file configures a
@ -73,7 +73,7 @@ in
};
extraConfig = mkOption {
type = types.string;
type = types.lines;
default = "";
example = "news.* -/var/log/news";
description = ''

@ -66,8 +66,9 @@ in
};
maxJobs = mkOption {
type = types.int;
default = 1;
example = 2;
example = 64;
description = "
This option defines the maximum number of jobs that Nix will try
to build in parallel. The default is 1. You should generally
@ -77,8 +78,8 @@ in
};
useChroot = mkOption {
type = types.bool;
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
@ -88,6 +89,7 @@ in
};
chrootDirs = mkOption {
type = types.listOf types.str;
default = [];
example = [ "/dev" "/proc" ];
description =
@ -98,6 +100,7 @@ in
};
extraOptions = mkOption {
type = types.lines;
default = "";
example = ''
gc-keep-outputs = true
@ -107,6 +110,7 @@ in
};
distributedBuilds = mkOption {
type = types.bool;
default = false;
description = ''
Whether to distribute builds to the machines listed in
@ -115,22 +119,25 @@ in
};
daemonNiceLevel = mkOption {
type = types.int;
default = 0;
description = "
description = ''
Nix daemon process priority. This priority propagates to build processes.
0 is the default Unix process priority, 20 is the lowest.
";
'';
};
daemonIONiceLevel = mkOption {
type = types.int;
default = 0;
description = "
description = ''
Nix daemon process I/O priority. This priority propagates to build processes.
0 is the default Unix process I/O priority, 7 is the lowest.
";
'';
};
buildMachines = mkOption {
type = types.listOf types.attrs;
default = [];
example = [
{ hostName = "voila.labs.cs.uu.nl";
@ -176,24 +183,26 @@ in
};
proxy = mkOption {
type = types.str;
default = "";
description = "
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";
};
# Environment variables for running Nix.
envVars = mkOption {
type = types.attrs;
internal = true;
default = {};
type = types.attrs;
description = "Environment variables used by Nix.";
};
nrBuildUsers = mkOption {
type = types.int;
default = 10;
description = ''
Number of <literal>nixbld</literal> user accounts created to
@ -204,6 +213,7 @@ in
};
readOnlyStore = mkOption {
type = types.bool;
default = true;
description = ''
If set, NixOS will enforce the immutability of the Nix store
@ -214,8 +224,8 @@ in
};
binaryCaches = mkOption {
type = types.listOf types.str;
default = [ http://cache.nixos.org/ ];
type = types.listOf types.string;
description = ''
List of binary cache URLs used to obtain pre-built binaries
of Nix packages.
@ -223,9 +233,9 @@ in
};
trustedBinaryCaches = mkOption {
type = types.listOf types.str;
default = [ ];
example = [ http://hydra.nixos.org/ ];
type = types.listOf types.string;
description = ''
List of binary cache URLs that non-root users can use (in
addition to those specified using

@ -53,14 +53,15 @@ in
options = {
services.nixosManual.enable = mkOption {
default = true;
type = types.bool;
default = true;
description = ''
Whether to build the NixOS manual pages.
'';
};
services.nixosManual.showManual = mkOption {
type = types.bool;
default = false;
description = ''
Whether to show the NixOS manual on one of the virtual
@ -76,6 +77,7 @@ in
};
services.nixosManual.browser = mkOption {
type = types.path;
default = "${pkgs.w3m}/bin/w3m";
description = ''
Browser used to show the manual.

@ -17,6 +17,7 @@ in
options = {
services.rogue.enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the Rogue game on one of the virtual
@ -25,6 +26,7 @@ in
};
services.rogue.tty = mkOption {
type = types.str;
default = "tty9";
description = ''
Virtual console on which to run Rogue.

@ -53,6 +53,7 @@ in
options = {
networking.firewall.enable = mkOption {
type = types.bool;
default = false;
description =
''
@ -64,6 +65,7 @@ in
};
networking.firewall.logRefusedConnections = mkOption {
type = types.bool;
default = true;
description =
''
@ -72,6 +74,7 @@ in
};
networking.firewall.logRefusedPackets = mkOption {
type = types.bool;
default = false;
description =
''
@ -82,6 +85,7 @@ in
};
networking.firewall.logRefusedUnicastsOnly = mkOption {
type = types.bool;
default = true;
description =
''
@ -93,6 +97,7 @@ in
};
networking.firewall.rejectPackets = mkOption {
type = types.bool;
default = false;
description =
''
@ -193,6 +198,7 @@ in
};
networking.firewall.extraCommands = mkOption {
type = types.lines;
default = "";
example = "iptables -A INPUT -p icmp -j ACCEPT";
description =

@ -19,6 +19,7 @@ in
options = {
networking.nat.enable = mkOption {
type = types.bool;
default = false;
description =
''
@ -27,6 +28,7 @@ in
};
networking.nat.internalIPs = mkOption {
type = types.listOf types.str;
example = [ "192.168.1.0/24" ] ;
description =
''
@ -34,12 +36,10 @@ in
coming from these networks and destined for the external
interface will be rewritten.
'';
# Backward compatibility: this used to be a single range instead
# of a list.
apply = x: if isList x then x else [x];
};
networking.nat.externalInterface = mkOption {
type = types.str;
example = "eth1";
description =
''
@ -48,7 +48,8 @@ in
};
networking.nat.externalIP = mkOption {
default = "";
type = types.nullOr types.str;
default = null;
example = "203.0.113.123";
description =
''
@ -86,7 +87,7 @@ in
''
iptables -t nat -A POSTROUTING \
-s ${network} -o ${cfg.externalInterface} \
${if cfg.externalIP == ""
${if cfg.externalIP == null
then "-j MASQUERADE"
else "-j SNAT --to-source ${cfg.externalIP}"}
''

@ -40,6 +40,7 @@ in
services.rpcbind = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable `rpcbind', an ONC RPC directory service

@ -27,7 +27,7 @@ let
openssh.authorizedKeys = {
keys = mkOption {
type = types.listOf types.string;
type = types.listOf types.str;
default = [];
description = ''
A list of verbatim OpenSSH public keys that should be added to the
@ -39,6 +39,7 @@ let
};
keyFiles = mkOption {
type = types.listOf types.str;
default = [];
description = ''
A list of files each containing one OpenSSH public key that should be
@ -77,6 +78,7 @@ in
services.openssh = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the OpenSSH secure shell daemon, which
@ -85,6 +87,7 @@ in
};
forwardX11 = mkOption {
type = types.bool;
default = cfgc.setXAuthLocation;
description = ''
Whether to allow X11 connections to be forwarded.
@ -92,6 +95,7 @@ in
};
allowSFTP = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable the SFTP subsystem in the SSH daemon. This
@ -112,6 +116,7 @@ in
};
gatewayPorts = mkOption {
type = types.str;
default = "no";
description = ''
Specifies whether remote hosts are allowed to connect to
@ -122,6 +127,7 @@ in
};
ports = mkOption {
type = types.listOf types.int;
default = [22];
description = ''
Specifies on which ports the SSH daemon listens.
@ -129,6 +135,7 @@ in
};
passwordAuthentication = mkOption {
type = types.bool;
default = true;
description = ''
Specifies whether password authentication is allowed.
@ -136,6 +143,7 @@ in
};
challengeResponseAuthentication = mkOption {
type = types.bool;
default = true;
description = ''
Specifies whether challenge/response authentication is allowed.
@ -143,6 +151,7 @@ in
};
hostKeys = mkOption {
type = types.listOf types.attrs;
default =
[ { path = "/etc/ssh/ssh_host_dsa_key";
type = "dsa";
@ -163,11 +172,13 @@ in
};
authorizedKeysFiles = mkOption {
type = types.listOf types.str;
default = [];
description = "Files from with authorized keys are read.";
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = "Verbatim contents of <filename>sshd_config</filename>.";
};
@ -202,7 +213,7 @@ in
The path to the public key file for the host. The public
key file is read at build time and saved in the Nix store.
You can fetch a public key file from a running SSH server
with the <literal>ssh-keyscan</literal> command.
with the <command>ssh-keyscan</command> command.
'';
};
};

@ -49,6 +49,7 @@ in
services.printing = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable printing support through the CUPS daemon.
@ -56,6 +57,8 @@ in
};
bindirCmds = mkOption {
type = types.lines;
internal = true;
default = "";
description = ''
Additional commands executed while creating the directory
@ -64,6 +67,7 @@ in
};
cupsdConf = mkOption {
type = types.lines;
default = "";
example =
''
@ -77,13 +81,16 @@ in
};
drivers = mkOption {
example = [ pkgs.splix ];
type = types.listOf types.path;
example = literalExample "[ pkgs.splix ]";
description = ''
CUPS drivers (CUPS, gs and samba are added unconditionally).
CUPS drivers to use. Drivers provided by CUPS, Ghostscript
and Samba are added unconditionally.
'';
};
tempDir = mkOption {
type = types.path;
default = "/tmp";
example = "/tmp/cups";
description = ''

@ -17,18 +17,21 @@ in
options = {
services.atd.enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the `at' daemon, a command scheduler.
Whether to enable the <command>at</command> daemon, a command scheduler.
'';
};
services.atd.allowEveryone = mkOption {
type = types.bool;
default = false;
description = ''
Whether to make /var/spool/at{jobs,spool} writeable
by everyone (and sticky). This is normally not needed since
the `at' commands are setuid/setgid `atd'.
Whether to make <filename>/var/spool/at{jobs,spool}</filename>
writeable by everyone (and sticky). This is normally not
needed since the <command>at</command> commands are
setuid/setgid <literal>atd</literal>.
'';
};

@ -11,7 +11,9 @@ let
''
SHELL=${pkgs.bash}/bin/bash
PATH=${config.system.path}/bin:${config.system.path}/sbin
MAILTO="${config.services.cron.mailto}"
${optionalString (config.services.cron.mailto != null) ''
MAILTO="${config.services.cron.mailto}"
''}
NIX_CONF_DIR=/etc/nix
${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)}
'';
@ -34,21 +36,25 @@ in
services.cron = {
enable = mkOption {
type = types.bool;
default = true;
description = "Whether to enable the `vixie cron' daemon.";
description = "Whether to enable the Vixie cron daemon.";
};
mailto = mkOption {
default = "";
description = " The job output will be mailed to this email address. ";
type = types.nullOr types.str;
default = null;
description = "Email address to which job output will be mailed.";
};
systemCronJobs = mkOption {
type = types.listOf types.str;
default = [];
example = [
"* * * * * test ls -l / > /tmp/cronout 2>&1"
"* * * * * eelco echo Hello World > /home/eelco/cronout"
];
example = literalExample ''
[ "* * * * * test ls -l / > /tmp/cronout 2>&1"
"* * * * * eelco echo Hello World > /home/eelco/cronout"
]
'';
description = ''
A list of Cron jobs to be appended to the system-wide
crontab. See the manual page for crontab for the expected

@ -6,7 +6,7 @@ let
cfg = config.services.fcron;
queuelen = if cfg.queuelen == "" then "" else "-q ${toString cfg.queuelen}";
queuelen = if cfg.queuelen == null then "" else "-q ${toString cfg.queuelen}";
systemCronJobs =
''
@ -34,33 +34,40 @@ in
services.fcron = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the `fcron' daemon.";
description = "Whether to enable the <command>fcron</command> daemon.";
};
allow = mkOption {
type = types.listOf types.str;
default = [ "all" ];
description = ''
Users allowed to use fcrontab and fcrondyn (one name per line, "all" for everyone).
Users allowed to use fcrontab and fcrondyn (one name per
line, <literal>all</literal> for everyone).
'';
};
deny = mkOption {
type = types.listOf types.str;
default = [];
description = "Users forbidden from using fcron.";
};
maxSerialJobs = mkOption {
type = types.int;
default = 1;
description = "Maximum number of serial jobs which can run simultaneously.";
};
queuelen = mkOption {
default = "";
description = "Number of jobs the serial queue and the lavg queue can contain - empty to net set this number (-q)";
type = types.nullOr types.int;
default = null;
description = "Number of jobs the serial queue and the lavg queue can contain.";
};
systab = mkOption {
type = types.lines;
default = "";
description = ''The "system" crontab contents.'';
};

@ -77,6 +77,7 @@ in
};
packages = mkOption {
type = types.listOf types.path;
default = [];
description = ''
Packages whose D-Bus configuration files should be included in

@ -19,6 +19,7 @@ in
services.nscd = {
enable = mkOption {
type = types.bool;
default = true;
description = "Whether to enable the Name Service Cache Daemon.";
};

@ -11,6 +11,7 @@ with pkgs.lib;
services.mingetty = {
greetingLine = mkOption {
type = types.str;
default = ''<<< Welcome to NixOS ${config.system.nixosVersion} (\m) - \l >>>'';
description = ''
Welcome line printed by mingetty.
@ -18,6 +19,7 @@ with pkgs.lib;
};
helpLine = mkOption {
type = types.lines;
default = "";
description = ''
Help line printed by mingetty below the welcome line.

@ -17,6 +17,7 @@ in
services.gpm = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable GPM, the General Purpose Mouse daemon,
@ -25,6 +26,7 @@ in
};
protocol = mkOption {
type = types.str;
default = "ps/2";
description = "Mouse protocol to use.";
};

@ -24,17 +24,18 @@ in
services.xserver.desktopManager = {
session = mkOption {
internal = true;
default = [];
example = singleton
{ name = "kde";
bgSupport = true;
start = "...";
};
description = "
description = ''
Internal option used to add some common line to desktop manager
scripts before forwarding the value to the
<varname>displayManager</varname>.
";
'';
apply = list: {
list = map (d: d // {
manage = "desktop";

@ -51,13 +51,13 @@ in
services.xserver.desktopManager.kde4 = {
enable = mkOption {
type = types.bool;
default = false;
example = true;
description = "Enable the KDE 4 desktop environment.";
};
phononBackends = mkOption {
type = types.listOf types.string;
type = types.listOf types.str;
default = ["gstreamer"];
example = ["gstreamer" "vlc"];
description = "Which phonon multimedia backend kde should use";

@ -13,8 +13,8 @@ in
options = {
services.xserver.desktopManager.xfce.enable = mkOption {
type = types.bool;
default = false;
example = true;
description = "Enable the Xfce desktop environment.";
};

@ -166,16 +166,19 @@ in
services.xserver.displayManager = {
xauthBin = mkOption {
internal = true;
default = "${xorg.xauth}/bin/xauth";
description = "Path to the <command>xauth</command> program used by display managers.";
};
xserverBin = mkOption {
type = types.path;
default = "${xorg.xorgserver}/bin/X";
description = "Path to the X server used by display managers.";
};
xserverArgs = mkOption {
type = types.listOf types.str;
default = [];
example = [ "-ac" "-logverbose" "-nolisten tcp" ];
description = "List of arguments for the X server.";
@ -183,16 +186,17 @@ in
};
sessionCommands = mkOption {
type = types.lines;
default = "";
example =
''
xmessage "Hello World!" &
'';
type = types.string;
description = "Shell commands executed just before the window or desktop manager is started.";
};
desktopManagerHandlesLidAndPower = mkOption {
type = types.bool;
default = true;
description = ''
Whether the display manager should prevent systemd from handling
@ -256,6 +260,7 @@ in
};
environment = mkOption {
type = types.attrsOf types.unspecified;
default = {};
example = { SLIM_CFGFILE = /etc/slim.conf; };
description = "Additional environment variables needed by the display manager.";

@ -40,7 +40,7 @@ let
[X-*-Greeter]
HiddenUsers=root,nixbld1,nixbld2,nixbld3,nixbld4,nixbld5,nixbld6,nixbld7,nixbld8,nixbld9,nixbld10
PluginsLogin=${kdebase_workspace}/lib/kde4/kgreet_classic.so
${optionalString (cfg.themeDirectory != "")
${optionalString (cfg.themeDirectory != null)
''
UseTheme=true
Theme=${cfg.themeDirectory}
@ -78,6 +78,7 @@ in
services.xserver.displayManager.kdm = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the KDE display manager.
@ -85,6 +86,7 @@ in
};
enableXDMCP = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable XDMCP, which allows remote logins.
@ -92,7 +94,8 @@ in
};
themeDirectory = mkOption {
default = "";
type = types.nullOr types.str;
default = null;
description = ''
The path to a KDM theme directory. This theme
will be used by the KDM greeter.
@ -100,6 +103,7 @@ in
};
setupScript = mkOption {
type = types.lines;
default = "";
description = ''
The path to a KDM setup script. This script is run as root just
@ -109,6 +113,7 @@ in
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Options appended to <filename>kdmrc</filename>, the

@ -16,7 +16,7 @@ let
login_cmd exec ${pkgs.stdenv.shell} ${dmcfg.session.script} "%session"
halt_cmd ${config.systemd.package}/sbin/shutdown -h now
reboot_cmd ${config.systemd.package}/sbin/shutdown -r now
${optionalString (cfg.defaultUser != "") ("default_user " + cfg.defaultUser)}
${optionalString (cfg.defaultUser != null) ("default_user " + cfg.defaultUser)}
${optionalString cfg.autoLogin "auto_login yes"}
'';
@ -45,6 +45,7 @@ in
services.xserver.displayManager.slim = {
enable = mkOption {
type = types.bool;
default = config.services.xserver.enable;
description = ''
Whether to enable SLiM as the display manager.
@ -52,11 +53,14 @@ in
};
theme = mkOption {
type = types.nullOr types.path;
default = null;
example = pkgs.fetchurl {
url = http://download.berlios.de/slim/slim-wave.tar.gz;
sha256 = "0ndr419i5myzcylvxb89m9grl2xyq6fbnyc3lkd711mzlmnnfxdy";
};
example = literalExample ''
pkgs.fetchurl {
url = http://download.berlios.de/slim/slim-wave.tar.gz;
sha256 = "0ndr419i5myzcylvxb89m9grl2xyq6fbnyc3lkd711mzlmnnfxdy";
}
'';
description = ''
The theme for the SLiM login manager. If not specified, SLiM's
default theme is used. See <link
@ -66,7 +70,8 @@ in
};
defaultUser = mkOption {
default = "";
type = types.nullOr types.str;
default = null;
example = "login";
description = ''
The default user to load. If you put a username here you
@ -76,8 +81,8 @@ in
};
autoLogin = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
Automatically log in as the default user.
'';

@ -24,6 +24,7 @@ in
services.xserver.windowManager = {
session = mkOption {
internal = true;
default = [];
example = [{
name = "wmii";

@ -17,6 +17,7 @@ in
services.xfs = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the X Font Server.";
};
@ -28,10 +29,12 @@ in
###### implementation
config = mkIf config.services.xfs.enable (
mkAssert config.fonts.enableFontDir "
Please enable fontDir (fonts.enableFontDir) to use xfs.
" {
config = mkIf config.services.xfs.enable {
assertions = singleton
{ assertion = config.fonts.enableFontDir;
message = "Please enable fonts.enableFontDir to use the X Font Server.";
};
jobs.xfs =
{ description = "X Font Server";
@ -41,6 +44,6 @@ in
exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
};
});
};
}

@ -137,6 +137,7 @@ in
services.xserver = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable the X server.
@ -144,6 +145,7 @@ in
};
autorun = mkOption {
type = types.bool;
default = true;
description = ''
Whether to start the X server automatically.
@ -151,6 +153,7 @@ in
};
exportConfiguration = mkOption {
type = types.bool;
default = false;
description = ''
Whether to symlink the X server configuration under
@ -159,6 +162,7 @@ in
};
enableTCP = mkOption {
type = types.bool;
default = false;
description = ''
Whether to allow the X server to accept TCP connections.
@ -166,12 +170,14 @@ in
};
modules = mkOption {
type = types.listOf types.path;
default = [];
example = [ pkgs.xf86_input_wacom ];
description = "Packages to be added to the module search path of the X server.";
};
resolutions = mkOption {
type = types.listOf types.attrs;
default = [];
example = [ { x = 1600; y = 1200; } { x = 1024; y = 786; } ];
description = ''
@ -182,6 +188,7 @@ in
};
videoDriver = mkOption {
type = types.nullOr types.str;
default = null;
example = "i810";
description = ''
@ -192,6 +199,7 @@ in
};
videoDrivers = mkOption {
type = types.listOf types.str;
# !!! We'd like "nv" here, but it segfaults the X server.
default = [ "ati" "cirrus" "intel" "vesa" "vmware" ];
example = [ "vesa" ];
@ -203,8 +211,8 @@ in
};
vaapiDrivers = mkOption {
type = types.listOf types.path;
default = [ ];
defaultText = "[ pkgs.vaapiIntel pkgs.vaapiVdpau ]";
example = "[ pkgs.vaapiIntel pkgs.vaapiVdpau ]";
description = ''
Packages providing libva acceleration drivers.
@ -212,6 +220,7 @@ in
};
driSupport = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable accelerated OpenGL rendering through the
@ -220,6 +229,7 @@ in
};
driSupport32Bit = mkOption {
type = types.bool;
default = false;
description = ''
On 64-bit systems, whether to support Direct Rendering for
@ -230,6 +240,7 @@ in
};
s3tcSupport = mkOption {
type = types.bool;
default = false;
description = ''
Make S3TC(S3 Texture Compression) via libtxc_dxtn available
@ -241,6 +252,7 @@ in
};
startOpenSSHAgent = mkOption {
type = types.bool;
default = true;
description = ''
Whether to start the OpenSSH agent when you log in. The OpenSSH agent
@ -251,6 +263,7 @@ in
};
startGnuPGAgent = mkOption {
type = types.bool;
default = false;
description = ''
Whether to start the GnuPG agent when you log in. The GnuPG agent
@ -261,6 +274,7 @@ in
};
layout = mkOption {
type = types.str;
default = "us";
description = ''
Keyboard layout.
@ -268,6 +282,7 @@ in
};
xkbModel = mkOption {
type = types.str;
default = "pc104";
example = "presario";
description = ''
@ -276,6 +291,7 @@ in
};
xkbOptions = mkOption {
type = types.str;
default = "terminate:ctrl_alt_bksp";
example = "grp:caps_toggle, grp_led:scroll";
description = ''
@ -284,6 +300,7 @@ in
};
xkbVariant = mkOption {
type = types.str;
default = "";
example = "colemak";
description = ''
@ -292,6 +309,7 @@ in
};
config = mkOption {
type = types.lines;
description = ''
The contents of the configuration file of the X server
(<filename>xorg.conf</filename>).
@ -299,12 +317,14 @@ in
};
deviceSection = mkOption {
type = types.lines;
default = "";
example = "VideoRAM 131072";
description = "Contents of the first Device section of the X server configuration file.";
};
screenSection = mkOption {
type = types.lines;
default = "";
example = ''
Option "RandRRotation" "on"
@ -313,6 +333,7 @@ in
};
monitorSection = mkOption {
type = types.lines;
default = "";
example = "HorizSync 28-49";
description = "Contents of the first Monitor section of the X server configuration file.";
@ -334,6 +355,7 @@ in
};
moduleSection = mkOption {
type = types.lines;
default = "";
example =
''
@ -344,6 +366,7 @@ in
};
serverLayoutSection = mkOption {
type = types.lines;
default = "";
example =
''
@ -353,36 +376,40 @@ in
};
extraDisplaySettings = mkOption {
type = types.lines;
default = "";
example = "Virtual 2048 2048";
description = "Lines to be added to every Display subsection of the Screen section.";
};
defaultDepth = mkOption {
type = types.int;
default = 0;
example = 8;
description = "Default colour depth.";
};
useXFS = mkOption {
# FIXME: what's the type of this option?
default = false;
example = "unix/:7100";
description = "Determines how to connect to the X Font Server.";
};
tty = mkOption {
type = types.int;
default = 7;
example = 9;
description = "Virtual console for the X server.";
};
display = mkOption {
type = types.int;
default = 0;
example = 1;
description = "Display number for the X server.";
};
virtualScreen = mkOption {
type = types.nullOr types.attrs;
default = null;
example = { x = 2048; y = 2048; };
description = ''

@ -92,8 +92,7 @@ let
systemd = config.systemd.package;
inherit children;
kernelParams =
config.boot.kernelParams ++ config.boot.extraKernelParams;
kernelParams = config.boot.kernelParams;
installBootLoader =
config.system.build.installBootLoader
or "echo 'Warning: do not know how to make this configuration bootable; please enable a boot loader.' 1>&2; true";
@ -162,6 +161,7 @@ in
};
system.copySystemConfiguration = mkOption {
type = types.bool;
default = false;
description = ''
If enabled, copies the NixOS configuration file

@ -24,7 +24,7 @@ in
# We don't want to evaluate all of linuxPackages for the manual
# - some of it might not even evaluate correctly.
defaultText = "pkgs.linuxPackages";
example = "pkgs.linuxPackages_2_6_25";
example = literalExample "pkgs.linuxPackages_2_6_25";
description = ''
This option allows you to override the Linux kernel used by
NixOS. Since things like external kernel module packages are
@ -40,18 +40,9 @@ in
};
boot.kernelParams = mkOption {
type = types.listOf types.str;
default = [ ];
description = ''
The kernel parameters. If you want to add additional
parameters, it's best to set
<option>boot.extraKernelParams</option>.
'';
};
boot.extraKernelParams = mkOption {
default = [ ];
example = [ "boot.trace" ];
description = "Additional user-defined kernel parameters.";
description = "Parameters added to the kernel command line.";
};
boot.consoleLogLevel = mkOption {
@ -65,6 +56,7 @@ in
};
boot.vesa = mkOption {
type = types.bool;
default = false;
description = ''
Whether to activate VESA video mode on boot.
@ -72,13 +64,14 @@ in
};
boot.extraModulePackages = mkOption {
type = types.listOf types.path;
default = [];
# !!! example = [pkgs.nvidia_x11];
example = literalExample "[ pkgs.linuxPackages.nvidia_x11 ]";
description = "A list of additional packages supplying kernel modules.";
};
boot.kernelModules = mkOption {
type = types.listOf types.string;
type = types.listOf types.str;
default = [];
description = ''
The set of kernel modules to be loaded in the second stage of
@ -90,7 +83,7 @@ in
};
boot.initrd.availableKernelModules = mkOption {
type = types.listOf types.string;
type = types.listOf types.str;
default = [];
example = [ "sata_nv" "ext3" ];
description = ''
@ -111,7 +104,7 @@ in
};
boot.initrd.kernelModules = mkOption {
type = types.listOf types.string;
type = types.listOf types.str;
default = [];
description = "List of modules that are always loaded by the initrd.";
};

@ -78,7 +78,7 @@ in
devices = mkOption {
default = [];
example = [ "/dev/hda" ];
type = types.listOf types.string;
type = types.listOf types.str;
description = ''
The devices on which the boot loader, GRUB, will be
installed. Can be used instead of <literal>device</literal> to

@ -36,6 +36,7 @@ with pkgs.lib;
};
boot.blacklistedKernelModules = mkOption {
type = types.listOf types.str;
default = [];
example = [ "cirrusfb" "i2c_piix4" ];
description = ''

@ -243,39 +243,39 @@ in
default = true;
type = types.bool;
description = ''
Whether to run fsck on journaling filesystems such as ext3.
Whether to run <command>fsck</command> on journaling filesystems such as ext3.
'';
};
boot.initrd.mdadmConf = mkOption {
default = "";
type = with types; string;
type = types.lines;
description = ''
Contents of /etc/mdadm.conf at initrd.
Contents of <filename>/etc/mdadm.conf</filename> in stage 1.
'';
};
boot.initrd.preLVMCommands = mkOption {
default = "";
type = with types; string;
type = types.lines;
description = ''
Shell commands to be executed immediately before lvm discovery.
Shell commands to be executed immediately before LVM discovery.
'';
};
boot.initrd.postDeviceCommands = mkOption {
default = "";
type = with types; string;
type = types.lines;
description = ''
Shell commands to be executed immediately after stage 1 of the
boot has loaded kernel modules and created device nodes in
/dev.
<filename>/dev</filename>.
'';
};
boot.initrd.postMountCommands = mkOption {
default = "";
type = with types; string;
type = types.lines;
description = ''
Shell commands to be executed immediately after the stage 1
filesystems have been mounted.
@ -285,7 +285,7 @@ in
boot.initrd.extraUtilsCommands = mkOption {
internal = true;
default = "";
type = with types; string;
type = types.lines;
description = ''
Shell commands to be executed in the builder of the
extra-utils derivation. This can be used to provide
@ -296,7 +296,7 @@ in
boot.initrd.extraUtilsCommandsTest = mkOption {
internal = true;
default = "";
type = with types; string;
type = types.lines;
description = ''
Shell commands to be executed in the builder of the
extra-utils derivation after patchelf has done its
@ -306,12 +306,10 @@ in
};
boot.initrd.compressor = mkOption {
internal = true;
default = "gzip -9";
type = types.string;
description = "The compressor to use on the initrd";
type = types.str;
description = "The compressor to use on the initrd image.";
example = "xz";
};

@ -43,7 +43,7 @@ in
postBootCommands = mkOption {
default = "";
example = "rm -f /var/log/messages";
type = types.string;
type = types.lines;
description = ''
Shell commands to be executed just before systemd is started.
'';
@ -80,10 +80,10 @@ in
};
cleanTmpDir = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
Delete all files in /tmp/ during boot.
Whether to delete all files in <filename>/tmp</filename> during boot.
'';
};

@ -57,6 +57,7 @@ in
};
target = mkOption {
type = types.str;
description = ''
Name of symlink (relative to
<filename>/etc</filename>). Defaults to the attribute
@ -66,7 +67,7 @@ in
text = mkOption {
default = null;
type = types.nullOr types.string;
type = types.nullOr types.lines;
description = "Text of the file.";
};
@ -76,6 +77,7 @@ in
};
mode = mkOption {
type = types.str;
default = "symlink";
example = "0600";
description = ''

@ -8,9 +8,9 @@ with pkgs.lib;
options = {
powerManagement.cpuFreqGovernor = mkOption {
default = "";
type = types.nullOr types.str;
default = null;
example = "ondemand";
type = types.str;
description = ''
Configure the governor used to regulate the frequence of the
available CPUs. By default, the kernel configures the
@ -23,7 +23,7 @@ with pkgs.lib;
###### implementation
config = mkIf (config.powerManagement.cpuFreqGovernor != "") {
config = mkIf (config.powerManagement.cpuFreqGovernor != null) {
environment.systemPackages = [ pkgs.cpufrequtils ];

@ -40,7 +40,7 @@ in
{ environment.systemPackages = [ pkgs.miniupnpd ];
virtualisation.vlans = [ 1 2 ];
networking.nat.enable = true;
networking.nat.internalIPs = "192.168.2.0/24";
networking.nat.internalIPs = [ "192.168.2.0/24" ];
networking.nat.externalInterface = "eth1";
};

@ -20,7 +20,7 @@
{ config, pkgs, ... }:
{ virtualisation.vlans = [ 2 1 ];
networking.nat.enable = true;
networking.nat.internalIPs = "192.168.1.0/24";
networking.nat.internalIPs = [ "192.168.1.0/24" ];
networking.nat.externalInterface = "eth1";
};

Loading…
Cancel
Save