Add lots of missing option types
This commit is contained in:
parent
d882e19662
commit
408b8b5725
@ -5,6 +5,7 @@ with pkgs.lib;
|
|||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
gnu = mkOption {
|
gnu = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description =
|
description =
|
||||||
'' When enabled, GNU software is chosen by default whenever a there is
|
'' When enabled, GNU software is chosen by default whenever a there is
|
||||||
|
@ -18,16 +18,18 @@ in
|
|||||||
|
|
||||||
i18n = {
|
i18n = {
|
||||||
defaultLocale = mkOption {
|
defaultLocale = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "en_US.UTF-8";
|
default = "en_US.UTF-8";
|
||||||
example = "nl_NL.UTF-8";
|
example = "nl_NL.UTF-8";
|
||||||
description = "
|
description = ''
|
||||||
The default locale. It determines the language for program
|
The default locale. It determines the language for program
|
||||||
messages, the format for dates and times, sort order, and so on.
|
messages, the format for dates and times, sort order, and so on.
|
||||||
It also determines the character set, such as UTF-8.
|
It also determines the character set, such as UTF-8.
|
||||||
";
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
supportedLocales = mkOption {
|
supportedLocales = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = ["all"];
|
default = ["all"];
|
||||||
example = ["en_US.UTF-8/UTF-8" "nl_NL.UTF-8/UTF-8" "nl_NL/ISO-8859-1"];
|
example = ["en_US.UTF-8/UTF-8" "nl_NL.UTF-8/UTF-8" "nl_NL/ISO-8859-1"];
|
||||||
description = ''
|
description = ''
|
||||||
@ -40,22 +42,23 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
consoleFont = mkOption {
|
consoleFont = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "lat9w-16";
|
default = "lat9w-16";
|
||||||
example = "LatArCyrHeb-16";
|
example = "LatArCyrHeb-16";
|
||||||
description = "
|
description = ''
|
||||||
The font used for the virtual consoles. Leave empty to use
|
The font used for the virtual consoles. Leave empty to use
|
||||||
whatever the <command>setfont</command> program considers the
|
whatever the <command>setfont</command> program considers the
|
||||||
default font.
|
default font.
|
||||||
";
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
consoleKeyMap = mkOption {
|
consoleKeyMap = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "us";
|
default = "us";
|
||||||
example = "fr";
|
example = "fr";
|
||||||
description = "
|
description = ''
|
||||||
The keyboard mapping table for the virtual consoles.
|
The keyboard mapping table for the virtual consoles.
|
||||||
";
|
'';
|
||||||
type = types.str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -15,6 +15,7 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
networking.extraHosts = pkgs.lib.mkOption {
|
networking.extraHosts = pkgs.lib.mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = "192.168.0.1 lanlocalhost";
|
example = "192.168.0.1 lanlocalhost";
|
||||||
description = ''
|
description = ''
|
||||||
@ -23,6 +24,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.dnsSingleRequest = pkgs.lib.mkOption {
|
networking.dnsSingleRequest = pkgs.lib.mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Recent versions of glibc will issue both ipv4 (A) and ipv6 (AAAA)
|
Recent versions of glibc will issue both ipv4 (A) and ipv6 (AAAA)
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
with pkgs.lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
environment.noXlibs = pkgs.lib.mkOption {
|
environment.noXlibs = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
|
||||||
description = ''
|
description = ''
|
||||||
Switch off the options in the default configuration that require X libraries.
|
Switch off the options in the default configuration that require X libraries.
|
||||||
Currently this includes: ssh X11 forwarding, dbus, fonts.enableCoreFonts,
|
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;
|
programs.ssh.setXAuthLocation = false;
|
||||||
fonts = {
|
fonts = {
|
||||||
enableCoreFonts = false;
|
enableCoreFonts = false;
|
||||||
|
@ -17,6 +17,7 @@ in
|
|||||||
powerManagement = {
|
powerManagement = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -26,11 +27,13 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
resumeCommands = mkOption {
|
resumeCommands = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = "Commands executed after the system resumes from suspend-to-RAM.";
|
description = "Commands executed after the system resumes from suspend-to-RAM.";
|
||||||
};
|
};
|
||||||
|
|
||||||
powerUpCommands = mkOption {
|
powerUpCommands = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = "${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda";
|
example = "${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda";
|
||||||
description =
|
description =
|
||||||
@ -42,6 +45,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
powerDownCommands = mkOption {
|
powerDownCommands = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = "${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda";
|
example = "${pkgs.hdparm}/sbin/hdparm -B 255 /dev/sda";
|
||||||
description =
|
description =
|
||||||
|
@ -46,6 +46,7 @@ in {
|
|||||||
|
|
||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable the PulseAudio sound server.
|
Whether to enable the PulseAudio sound server.
|
||||||
@ -76,8 +77,9 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
|
type = types.path;
|
||||||
default = pulseaudio;
|
default = pulseaudio;
|
||||||
example = "pulseaudio.override { jackaudioSupport = true; }";
|
example = literalExample "pulseaudio.override { jackaudioSupport = true; }";
|
||||||
description = ''
|
description = ''
|
||||||
The PulseAudio derivation to use. This can be used to enable
|
The PulseAudio derivation to use. This can be used to enable
|
||||||
features (such as JACK support) that are not enabled in the
|
features (such as JACK support) that are not enabled in the
|
||||||
|
@ -35,7 +35,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
extraGroups = mkOption {
|
extraGroups = mkOption {
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "The user's auxiliary groups.";
|
description = "The user's auxiliary groups.";
|
||||||
};
|
};
|
||||||
@ -65,7 +65,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
password = mkOption {
|
password = mkOption {
|
||||||
type = with types; uniq (nullOr string);
|
type = with types; uniq (nullOr str);
|
||||||
default = null;
|
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.";
|
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 = {
|
options = {
|
||||||
|
|
||||||
hardware.enableAllFirmware = pkgs.lib.mkOption {
|
hardware.enableAllFirmware = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
type = pkgs.lib.types.bool;
|
type = types.bool;
|
||||||
description = ''
|
description = ''
|
||||||
Turn on this option if you want to enable all the firmware shipped with Debian/Ubuntu.
|
Turn on this option if you want to enable all the firmware shipped with Debian/Ubuntu.
|
||||||
'';
|
'';
|
||||||
@ -19,7 +21,7 @@
|
|||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = pkgs.lib.mkIf config.hardware.enableAllFirmware {
|
config = mkIf config.hardware.enableAllFirmware {
|
||||||
hardware.firmware = [ "${pkgs.firmwareLinuxNonfree}/lib/firmware" ];
|
hardware.firmware = [ "${pkgs.firmwareLinuxNonfree}/lib/firmware" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ in
|
|||||||
config = mkOption {
|
config = mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
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.
|
and ports used by the PCMCIA hardware.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
{pkgs, ...}:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
with pkgs.lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
environment.checkConfigurationOptions = pkgs.lib.mkOption {
|
environment.checkConfigurationOptions = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
example = false;
|
|
||||||
description = ''
|
description = ''
|
||||||
Whether to check the validity of the entire configuration.
|
Whether to check the validity of the entire configuration.
|
||||||
'';
|
'';
|
||||||
|
@ -14,8 +14,8 @@ in
|
|||||||
boot = {
|
boot = {
|
||||||
crashDump = {
|
crashDump = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
|
||||||
description = ''
|
description = ''
|
||||||
If enabled, NixOS will set up a kernel that will
|
If enabled, NixOS will set up a kernel that will
|
||||||
boot on crash, and leave the user to a stage1 debug1devices
|
boot on crash, and leave the user to a stage1 debug1devices
|
||||||
@ -35,6 +35,7 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
kernelParams = mkOption {
|
kernelParams = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [ "debug1devices" ];
|
default = [ "debug1devices" ];
|
||||||
description = ''
|
description = ''
|
||||||
Parameters that will be passed to the kernel kexec-ed on crash.
|
Parameters that will be passed to the kernel kexec-ed on crash.
|
||||||
|
@ -7,12 +7,14 @@
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
ids.uids = pkgs.lib.mkOption {
|
ids.uids = pkgs.lib.mkOption {
|
||||||
|
internal = true;
|
||||||
description = ''
|
description = ''
|
||||||
The user IDs used in NixOS.
|
The user IDs used in NixOS.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
ids.gids = pkgs.lib.mkOption {
|
ids.gids = pkgs.lib.mkOption {
|
||||||
|
internal = true;
|
||||||
description = ''
|
description = ''
|
||||||
The group IDs used in NixOS.
|
The group IDs used in NixOS.
|
||||||
'';
|
'';
|
||||||
|
@ -17,8 +17,8 @@ in
|
|||||||
services.locate = {
|
services.locate = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
|
||||||
description = ''
|
description = ''
|
||||||
If enabled, NixOS will periodically update the database of
|
If enabled, NixOS will periodically update the database of
|
||||||
files used by the <command>locate</command> command.
|
files used by the <command>locate</command> command.
|
||||||
@ -26,11 +26,12 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
period = mkOption {
|
period = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "15 02 * * *";
|
default = "15 02 * * *";
|
||||||
description = ''
|
description = ''
|
||||||
This option defines (in the format used by cron) when the
|
This option defines (in the format used by cron) when the
|
||||||
locate database is updated.
|
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 = {
|
options = {
|
||||||
passthru = pkgs.lib.mkOption {
|
passthru = pkgs.lib.mkOption {
|
||||||
|
visible = false;
|
||||||
description = ''
|
description = ''
|
||||||
This attribute set will be exported as a system attribute.
|
This attribute set will be exported as a system attribute.
|
||||||
You can put whatever you want here.
|
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
|
Rather, it should be the path of a symlink that points to the
|
||||||
actual shell in the Nix store.
|
actual shell in the Nix store.
|
||||||
'';
|
'';
|
||||||
type = types.uniq types.path;
|
type = types.path;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -16,6 +16,7 @@ in
|
|||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
|
|
||||||
forwardX11 = mkOption {
|
forwardX11 = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to request X11 forwarding on outgoing connections by default.
|
Whether to request X11 forwarding on outgoing connections by default.
|
||||||
@ -29,18 +30,21 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
setXAuthLocation = mkOption {
|
setXAuthLocation = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to set the path to <command>xauth</command> for X11-forwarded connections.
|
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 {
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Extra configuration text appended to <filename>ssh_config</filename>.
|
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" "grubSplashImage" ] [ "boot" "loader" "grub" "splashImage" ]
|
||||||
|
|
||||||
++ obsolete [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ]
|
++ obsolete [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ]
|
||||||
|
++ obsolete [ "boot" "extraKernelParams" ] [ "boot" "kernelParams" ]
|
||||||
|
|
||||||
# OpenSSH
|
# OpenSSH
|
||||||
++ obsolete [ "services" "sshd" "ports" ] [ "services" "openssh" "ports" ]
|
++ obsolete [ "services" "sshd" "ports" ] [ "services" "openssh" "ports" ]
|
||||||
|
@ -133,7 +133,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
text = mkOption {
|
text = mkOption {
|
||||||
type = types.nullOr types.string;
|
type = types.nullOr types.lines;
|
||||||
description = "Contents of the PAM service file.";
|
description = "Contents of the PAM service file.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ in
|
|||||||
|
|
||||||
security.pam.usb = {
|
security.pam.usb = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Enable USB login for all login systems that support it. For
|
Enable USB login for all login systems that support it. For
|
||||||
|
@ -13,11 +13,13 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
security.polkit.enable = mkOption {
|
security.polkit.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Whether to enable PolKit.";
|
description = "Whether to enable PolKit.";
|
||||||
};
|
};
|
||||||
|
|
||||||
security.polkit.permissions = mkOption {
|
security.polkit.permissions = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example =
|
example =
|
||||||
''
|
''
|
||||||
@ -49,6 +51,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
security.polkit.adminIdentities = mkOption {
|
security.polkit.adminIdentities = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "unix-user:0;unix-group:wheel";
|
default = "unix-user:0;unix-group:wheel";
|
||||||
example = "";
|
example = "";
|
||||||
description =
|
description =
|
||||||
|
@ -5,6 +5,7 @@ with pkgs.lib;
|
|||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
security.rngd.enable = mkOption {
|
security.rngd.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable the rng daemon, which adds entropy from
|
Whether to enable the rng daemon, which adds entropy from
|
||||||
|
@ -10,6 +10,7 @@ with pkgs.lib;
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
security.rtkit.enable = mkOption {
|
security.rtkit.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable the RealtimeKit system service, which hands
|
Whether to enable the RealtimeKit system service, which hands
|
||||||
|
@ -25,7 +25,9 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
security.setuidPrograms = mkOption {
|
security.setuidPrograms = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
|
example = ["passwd"];
|
||||||
description = ''
|
description = ''
|
||||||
The Nix store cannot contain setuid/setgid programs directly.
|
The Nix store cannot contain setuid/setgid programs directly.
|
||||||
For this reason, NixOS can automatically generate wrapper
|
For this reason, NixOS can automatically generate wrapper
|
||||||
@ -36,6 +38,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
security.setuidOwners = mkOption {
|
security.setuidOwners = mkOption {
|
||||||
|
type = types.listOf types.attrs;
|
||||||
default = [];
|
default = [];
|
||||||
example =
|
example =
|
||||||
[ { program = "sendmail";
|
[ { program = "sendmail";
|
||||||
@ -53,6 +56,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
security.wrapperDir = mkOption {
|
security.wrapperDir = mkOption {
|
||||||
|
internal = true;
|
||||||
|
type = types.path;
|
||||||
default = "/var/setuid-wrappers";
|
default = "/var/setuid-wrappers";
|
||||||
description = ''
|
description = ''
|
||||||
This option defines the path to the setuid wrappers. It
|
This option defines the path to the setuid wrappers. It
|
||||||
|
@ -17,6 +17,7 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
security.sudo.enable = mkOption {
|
security.sudo.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -26,6 +27,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
security.sudo.wheelNeedsPassword = mkOption {
|
security.sudo.wheelNeedsPassword = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -35,6 +37,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
security.sudo.configFile = mkOption {
|
security.sudo.configFile = mkOption {
|
||||||
|
type = types.lines;
|
||||||
# Note: if syntax errors are detected in this file, the NixOS
|
# Note: if syntax errors are detected in this file, the NixOS
|
||||||
# configuration will fail to build.
|
# configuration will fail to build.
|
||||||
description =
|
description =
|
||||||
|
@ -46,6 +46,7 @@ in
|
|||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to run PostgreSQL.
|
Whether to run PostgreSQL.
|
||||||
@ -53,6 +54,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
|
type = types.path;
|
||||||
example = literalExample "pkgs.postgresql92";
|
example = literalExample "pkgs.postgresql92";
|
||||||
description = ''
|
description = ''
|
||||||
PostgreSQL package to use.
|
PostgreSQL package to use.
|
||||||
@ -60,6 +62,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
|
type = types.int;
|
||||||
default = "5432";
|
default = "5432";
|
||||||
description = ''
|
description = ''
|
||||||
Port for PostgreSQL.
|
Port for PostgreSQL.
|
||||||
@ -67,6 +70,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
dataDir = mkOption {
|
dataDir = mkOption {
|
||||||
|
type = types.path;
|
||||||
default = "/var/db/postgresql";
|
default = "/var/db/postgresql";
|
||||||
description = ''
|
description = ''
|
||||||
Data directory for PostgreSQL.
|
Data directory for PostgreSQL.
|
||||||
@ -74,6 +78,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
authentication = mkOption {
|
authentication = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Defines how users authenticate themselves to the server.
|
Defines how users authenticate themselves to the server.
|
||||||
@ -81,6 +86,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
identMap = mkOption {
|
identMap = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Defines the mapping from system users to database users.
|
Defines the mapping from system users to database users.
|
||||||
@ -88,14 +94,15 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
initialScript = mkOption {
|
initialScript = mkOption {
|
||||||
default = null;
|
|
||||||
type = types.nullOr types.path;
|
type = types.nullOr types.path;
|
||||||
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
A file containing SQL statements to execute on first startup.
|
A file containing SQL statements to execute on first startup.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
enableTCPIP = mkOption {
|
enableTCPIP = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to run PostgreSQL with -i flag to enable TCP/IP connections.
|
Whether to run PostgreSQL with -i flag to enable TCP/IP connections.
|
||||||
@ -103,8 +110,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
extraPlugins = mkOption {
|
extraPlugins = mkOption {
|
||||||
|
type = types.listOf types.path;
|
||||||
default = [];
|
default = [];
|
||||||
example = "pkgs.postgis"; # of course don't use a string here!
|
example = literalExample "pkgs.postgis";
|
||||||
description = ''
|
description = ''
|
||||||
When this list contains elements a new store path is created.
|
When this list contains elements a new store path is created.
|
||||||
PostgreSQL and the elments are symlinked into it. Then pg_config,
|
PostgreSQL and the elments are symlinked into it. Then pg_config,
|
||||||
@ -118,15 +126,16 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = "Additional text to be appended to <filename>postgresql.conf</filename>.";
|
description = "Additional text to be appended to <filename>postgresql.conf</filename>.";
|
||||||
};
|
};
|
||||||
|
|
||||||
recoveryConfig = mkOption {
|
recoveryConfig = mkOption {
|
||||||
|
type = types.nullOr types.lines;
|
||||||
default = null;
|
default = null;
|
||||||
type = types.nullOr types.string;
|
|
||||||
description = ''
|
description = ''
|
||||||
Values to put into recovery.conf file.
|
Contents of the <filename>recovery.conf</filename> file.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -66,21 +66,25 @@ in
|
|||||||
services.acpid = {
|
services.acpid = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Whether to enable the ACPI daemon.";
|
description = "Whether to enable the ACPI daemon.";
|
||||||
};
|
};
|
||||||
|
|
||||||
powerEventCommands = mkOption {
|
powerEventCommands = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = "Shell commands to execute on a button/power.* event.";
|
description = "Shell commands to execute on a button/power.* event.";
|
||||||
};
|
};
|
||||||
|
|
||||||
lidEventCommands = mkOption {
|
lidEventCommands = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = "Shell commands to execute on a button/lid.* event.";
|
description = "Shell commands to execute on a button/lid.* event.";
|
||||||
};
|
};
|
||||||
|
|
||||||
acEventCommands = mkOption {
|
acEventCommands = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = "Shell commands to execute on an ac_adapter.* event.";
|
description = "Shell commands to execute on an ac_adapter.* event.";
|
||||||
};
|
};
|
||||||
|
@ -9,6 +9,7 @@ with pkgs.lib;
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
hardware.bluetooth.enable = mkOption {
|
hardware.bluetooth.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Whether to enable support for Bluetooth.";
|
description = "Whether to enable support for Bluetooth.";
|
||||||
};
|
};
|
||||||
|
@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
with pkgs.lib;
|
with pkgs.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
pkg = if config.hardware.sane.snapshot then pkgs.saneBackendsGit else pkgs.saneBackends;
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
###### interface
|
###### interface
|
||||||
@ -9,11 +15,13 @@ with pkgs.lib;
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
hardware.sane.enable = mkOption {
|
hardware.sane.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Enable support for SANE scanners.";
|
description = "Enable support for SANE scanners.";
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.sane.snapshot = mkOption {
|
hardware.sane.snapshot = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Use a development snapshot of SANE scanner drivers.";
|
description = "Use a development snapshot of SANE scanner drivers.";
|
||||||
};
|
};
|
||||||
@ -23,17 +31,12 @@ with pkgs.lib;
|
|||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = let pkg = if config.hardware.sane.snapshot
|
config = mkIf config.hardware.sane.enable {
|
||||||
then pkgs.saneBackendsGit
|
|
||||||
else pkgs.saneBackends;
|
|
||||||
in mkIf config.hardware.sane.enable {
|
|
||||||
environment.systemPackages = [ pkg ];
|
environment.systemPackages = [ pkg ];
|
||||||
services.udev.packages = [ pkg ];
|
services.udev.packages = [ pkg ];
|
||||||
|
|
||||||
users.extraGroups = singleton {
|
users.extraGroups."scanner".gid = config.ids.gids.scanner;
|
||||||
name = "scanner";
|
|
||||||
gid = config.ids.gids.scanner;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -114,6 +114,7 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
boot.hardwareScan = mkOption {
|
boot.hardwareScan = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to try to load kernel modules for all detected hardware.
|
Whether to try to load kernel modules for all detected hardware.
|
||||||
|
@ -13,6 +13,7 @@ with pkgs.lib;
|
|||||||
services.udisks = {
|
services.udisks = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable Udisks, a DBus service that allows
|
Whether to enable Udisks, a DBus service that allows
|
||||||
|
@ -13,6 +13,7 @@ with pkgs.lib;
|
|||||||
services.udisks2 = {
|
services.udisks2 = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable Udisks, a DBus service that allows
|
Whether to enable Udisks, a DBus service that allows
|
||||||
|
@ -13,6 +13,7 @@ with pkgs.lib;
|
|||||||
services.upower = {
|
services.upower = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable Upower, a DBus service that provides power
|
Whether to enable Upower, a DBus service that provides power
|
||||||
|
@ -55,7 +55,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
defaultConfig = mkOption {
|
defaultConfig = mkOption {
|
||||||
type = types.string;
|
type = types.lines;
|
||||||
default = defaultConf;
|
default = defaultConf;
|
||||||
description = ''
|
description = ''
|
||||||
The default <filename>syslog.conf</filename> file configures a
|
The default <filename>syslog.conf</filename> file configures a
|
||||||
@ -73,7 +73,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.string;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = "news.* -/var/log/news";
|
example = "news.* -/var/log/news";
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -66,8 +66,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
maxJobs = mkOption {
|
maxJobs = mkOption {
|
||||||
|
type = types.int;
|
||||||
default = 1;
|
default = 1;
|
||||||
example = 2;
|
example = 64;
|
||||||
description = "
|
description = "
|
||||||
This option defines the maximum number of jobs that Nix will try
|
This option defines the maximum number of jobs that Nix will try
|
||||||
to build in parallel. The default is 1. You should generally
|
to build in parallel. The default is 1. You should generally
|
||||||
@ -77,8 +78,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
useChroot = mkOption {
|
useChroot = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
|
||||||
description = "
|
description = "
|
||||||
If set, Nix will perform builds in a chroot-environment that it
|
If set, Nix will perform builds in a chroot-environment that it
|
||||||
will set up automatically for each build. This prevents
|
will set up automatically for each build. This prevents
|
||||||
@ -88,6 +89,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
chrootDirs = mkOption {
|
chrootDirs = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
example = [ "/dev" "/proc" ];
|
example = [ "/dev" "/proc" ];
|
||||||
description =
|
description =
|
||||||
@ -98,6 +100,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = mkOption {
|
extraOptions = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = ''
|
example = ''
|
||||||
gc-keep-outputs = true
|
gc-keep-outputs = true
|
||||||
@ -107,6 +110,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
distributedBuilds = mkOption {
|
distributedBuilds = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to distribute builds to the machines listed in
|
Whether to distribute builds to the machines listed in
|
||||||
@ -115,22 +119,25 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
daemonNiceLevel = mkOption {
|
daemonNiceLevel = mkOption {
|
||||||
|
type = types.int;
|
||||||
default = 0;
|
default = 0;
|
||||||
description = "
|
description = ''
|
||||||
Nix daemon process priority. This priority propagates to build processes.
|
Nix daemon process priority. This priority propagates to build processes.
|
||||||
0 is the default Unix process priority, 20 is the lowest.
|
0 is the default Unix process priority, 20 is the lowest.
|
||||||
";
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
daemonIONiceLevel = mkOption {
|
daemonIONiceLevel = mkOption {
|
||||||
|
type = types.int;
|
||||||
default = 0;
|
default = 0;
|
||||||
description = "
|
description = ''
|
||||||
Nix daemon process I/O priority. This priority propagates to build processes.
|
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.
|
0 is the default Unix process I/O priority, 7 is the lowest.
|
||||||
";
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
buildMachines = mkOption {
|
buildMachines = mkOption {
|
||||||
|
type = types.listOf types.attrs;
|
||||||
default = [];
|
default = [];
|
||||||
example = [
|
example = [
|
||||||
{ hostName = "voila.labs.cs.uu.nl";
|
{ hostName = "voila.labs.cs.uu.nl";
|
||||||
@ -176,24 +183,26 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
proxy = mkOption {
|
proxy = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "";
|
default = "";
|
||||||
description = "
|
description = ''
|
||||||
This option specifies the proxy to use for fetchurl. The real effect
|
This option specifies the proxy to use for fetchurl. The real effect
|
||||||
is just exporting http_proxy, https_proxy and ftp_proxy with that
|
is just exporting http_proxy, https_proxy and ftp_proxy with that
|
||||||
value.
|
value.
|
||||||
";
|
'';
|
||||||
example = "http://127.0.0.1:3128";
|
example = "http://127.0.0.1:3128";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Environment variables for running Nix.
|
# Environment variables for running Nix.
|
||||||
envVars = mkOption {
|
envVars = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
internal = true;
|
internal = true;
|
||||||
default = {};
|
default = {};
|
||||||
type = types.attrs;
|
|
||||||
description = "Environment variables used by Nix.";
|
description = "Environment variables used by Nix.";
|
||||||
};
|
};
|
||||||
|
|
||||||
nrBuildUsers = mkOption {
|
nrBuildUsers = mkOption {
|
||||||
|
type = types.int;
|
||||||
default = 10;
|
default = 10;
|
||||||
description = ''
|
description = ''
|
||||||
Number of <literal>nixbld</literal> user accounts created to
|
Number of <literal>nixbld</literal> user accounts created to
|
||||||
@ -204,6 +213,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
readOnlyStore = mkOption {
|
readOnlyStore = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
If set, NixOS will enforce the immutability of the Nix store
|
If set, NixOS will enforce the immutability of the Nix store
|
||||||
@ -214,8 +224,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
binaryCaches = mkOption {
|
binaryCaches = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [ http://cache.nixos.org/ ];
|
default = [ http://cache.nixos.org/ ];
|
||||||
type = types.listOf types.string;
|
|
||||||
description = ''
|
description = ''
|
||||||
List of binary cache URLs used to obtain pre-built binaries
|
List of binary cache URLs used to obtain pre-built binaries
|
||||||
of Nix packages.
|
of Nix packages.
|
||||||
@ -223,9 +233,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
trustedBinaryCaches = mkOption {
|
trustedBinaryCaches = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
example = [ http://hydra.nixos.org/ ];
|
example = [ http://hydra.nixos.org/ ];
|
||||||
type = types.listOf types.string;
|
|
||||||
description = ''
|
description = ''
|
||||||
List of binary cache URLs that non-root users can use (in
|
List of binary cache URLs that non-root users can use (in
|
||||||
addition to those specified using
|
addition to those specified using
|
||||||
|
@ -53,14 +53,15 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
services.nixosManual.enable = mkOption {
|
services.nixosManual.enable = mkOption {
|
||||||
default = true;
|
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to build the NixOS manual pages.
|
Whether to build the NixOS manual pages.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nixosManual.showManual = mkOption {
|
services.nixosManual.showManual = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to show the NixOS manual on one of the virtual
|
Whether to show the NixOS manual on one of the virtual
|
||||||
@ -76,6 +77,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
services.nixosManual.browser = mkOption {
|
services.nixosManual.browser = mkOption {
|
||||||
|
type = types.path;
|
||||||
default = "${pkgs.w3m}/bin/w3m";
|
default = "${pkgs.w3m}/bin/w3m";
|
||||||
description = ''
|
description = ''
|
||||||
Browser used to show the manual.
|
Browser used to show the manual.
|
||||||
|
@ -17,6 +17,7 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
services.rogue.enable = mkOption {
|
services.rogue.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable the Rogue game on one of the virtual
|
Whether to enable the Rogue game on one of the virtual
|
||||||
@ -25,6 +26,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
services.rogue.tty = mkOption {
|
services.rogue.tty = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "tty9";
|
default = "tty9";
|
||||||
description = ''
|
description = ''
|
||||||
Virtual console on which to run Rogue.
|
Virtual console on which to run Rogue.
|
||||||
|
@ -53,6 +53,7 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
networking.firewall.enable = mkOption {
|
networking.firewall.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -64,6 +65,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.logRefusedConnections = mkOption {
|
networking.firewall.logRefusedConnections = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -72,6 +74,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.logRefusedPackets = mkOption {
|
networking.firewall.logRefusedPackets = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -82,6 +85,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.logRefusedUnicastsOnly = mkOption {
|
networking.firewall.logRefusedUnicastsOnly = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -93,6 +97,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.rejectPackets = mkOption {
|
networking.firewall.rejectPackets = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -193,6 +198,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.extraCommands = mkOption {
|
networking.firewall.extraCommands = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = "iptables -A INPUT -p icmp -j ACCEPT";
|
example = "iptables -A INPUT -p icmp -j ACCEPT";
|
||||||
description =
|
description =
|
||||||
|
@ -19,6 +19,7 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
networking.nat.enable = mkOption {
|
networking.nat.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -27,6 +28,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.nat.internalIPs = mkOption {
|
networking.nat.internalIPs = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
example = [ "192.168.1.0/24" ] ;
|
example = [ "192.168.1.0/24" ] ;
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -34,12 +36,10 @@ in
|
|||||||
coming from these networks and destined for the external
|
coming from these networks and destined for the external
|
||||||
interface will be rewritten.
|
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 {
|
networking.nat.externalInterface = mkOption {
|
||||||
|
type = types.str;
|
||||||
example = "eth1";
|
example = "eth1";
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -48,7 +48,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.nat.externalIP = mkOption {
|
networking.nat.externalIP = mkOption {
|
||||||
default = "";
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
example = "203.0.113.123";
|
example = "203.0.113.123";
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -86,7 +87,7 @@ in
|
|||||||
''
|
''
|
||||||
iptables -t nat -A POSTROUTING \
|
iptables -t nat -A POSTROUTING \
|
||||||
-s ${network} -o ${cfg.externalInterface} \
|
-s ${network} -o ${cfg.externalInterface} \
|
||||||
${if cfg.externalIP == ""
|
${if cfg.externalIP == null
|
||||||
then "-j MASQUERADE"
|
then "-j MASQUERADE"
|
||||||
else "-j SNAT --to-source ${cfg.externalIP}"}
|
else "-j SNAT --to-source ${cfg.externalIP}"}
|
||||||
''
|
''
|
||||||
|
@ -40,6 +40,7 @@ in
|
|||||||
services.rpcbind = {
|
services.rpcbind = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable `rpcbind', an ONC RPC directory service
|
Whether to enable `rpcbind', an ONC RPC directory service
|
||||||
|
@ -27,7 +27,7 @@ let
|
|||||||
|
|
||||||
openssh.authorizedKeys = {
|
openssh.authorizedKeys = {
|
||||||
keys = mkOption {
|
keys = mkOption {
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
description = ''
|
description = ''
|
||||||
A list of verbatim OpenSSH public keys that should be added to the
|
A list of verbatim OpenSSH public keys that should be added to the
|
||||||
@ -39,6 +39,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
keyFiles = mkOption {
|
keyFiles = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
description = ''
|
description = ''
|
||||||
A list of files each containing one OpenSSH public key that should be
|
A list of files each containing one OpenSSH public key that should be
|
||||||
@ -77,6 +78,7 @@ in
|
|||||||
services.openssh = {
|
services.openssh = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable the OpenSSH secure shell daemon, which
|
Whether to enable the OpenSSH secure shell daemon, which
|
||||||
@ -85,6 +87,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
forwardX11 = mkOption {
|
forwardX11 = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = cfgc.setXAuthLocation;
|
default = cfgc.setXAuthLocation;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to allow X11 connections to be forwarded.
|
Whether to allow X11 connections to be forwarded.
|
||||||
@ -92,6 +95,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
allowSFTP = mkOption {
|
allowSFTP = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable the SFTP subsystem in the SSH daemon. This
|
Whether to enable the SFTP subsystem in the SSH daemon. This
|
||||||
@ -112,6 +116,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
gatewayPorts = mkOption {
|
gatewayPorts = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "no";
|
default = "no";
|
||||||
description = ''
|
description = ''
|
||||||
Specifies whether remote hosts are allowed to connect to
|
Specifies whether remote hosts are allowed to connect to
|
||||||
@ -122,6 +127,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
ports = mkOption {
|
ports = mkOption {
|
||||||
|
type = types.listOf types.int;
|
||||||
default = [22];
|
default = [22];
|
||||||
description = ''
|
description = ''
|
||||||
Specifies on which ports the SSH daemon listens.
|
Specifies on which ports the SSH daemon listens.
|
||||||
@ -129,6 +135,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
passwordAuthentication = mkOption {
|
passwordAuthentication = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Specifies whether password authentication is allowed.
|
Specifies whether password authentication is allowed.
|
||||||
@ -136,6 +143,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
challengeResponseAuthentication = mkOption {
|
challengeResponseAuthentication = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Specifies whether challenge/response authentication is allowed.
|
Specifies whether challenge/response authentication is allowed.
|
||||||
@ -143,6 +151,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
hostKeys = mkOption {
|
hostKeys = mkOption {
|
||||||
|
type = types.listOf types.attrs;
|
||||||
default =
|
default =
|
||||||
[ { path = "/etc/ssh/ssh_host_dsa_key";
|
[ { path = "/etc/ssh/ssh_host_dsa_key";
|
||||||
type = "dsa";
|
type = "dsa";
|
||||||
@ -163,11 +172,13 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
authorizedKeysFiles = mkOption {
|
authorizedKeysFiles = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Files from with authorized keys are read.";
|
description = "Files from with authorized keys are read.";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = "Verbatim contents of <filename>sshd_config</filename>.";
|
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
|
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.
|
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
|
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 = {
|
services.printing = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable printing support through the CUPS daemon.
|
Whether to enable printing support through the CUPS daemon.
|
||||||
@ -56,6 +57,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
bindirCmds = mkOption {
|
bindirCmds = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
internal = true;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Additional commands executed while creating the directory
|
Additional commands executed while creating the directory
|
||||||
@ -64,6 +67,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
cupsdConf = mkOption {
|
cupsdConf = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example =
|
example =
|
||||||
''
|
''
|
||||||
@ -77,13 +81,16 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
drivers = mkOption {
|
drivers = mkOption {
|
||||||
example = [ pkgs.splix ];
|
type = types.listOf types.path;
|
||||||
|
example = literalExample "[ pkgs.splix ]";
|
||||||
description = ''
|
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 {
|
tempDir = mkOption {
|
||||||
|
type = types.path;
|
||||||
default = "/tmp";
|
default = "/tmp";
|
||||||
example = "/tmp/cups";
|
example = "/tmp/cups";
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -17,18 +17,21 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
services.atd.enable = mkOption {
|
services.atd.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
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 {
|
services.atd.allowEveryone = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to make /var/spool/at{jobs,spool} writeable
|
Whether to make <filename>/var/spool/at{jobs,spool}</filename>
|
||||||
by everyone (and sticky). This is normally not needed since
|
writeable by everyone (and sticky). This is normally not
|
||||||
the `at' commands are setuid/setgid `atd'.
|
needed since the <command>at</command> commands are
|
||||||
|
setuid/setgid <literal>atd</literal>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -11,7 +11,9 @@ let
|
|||||||
''
|
''
|
||||||
SHELL=${pkgs.bash}/bin/bash
|
SHELL=${pkgs.bash}/bin/bash
|
||||||
PATH=${config.system.path}/bin:${config.system.path}/sbin
|
PATH=${config.system.path}/bin:${config.system.path}/sbin
|
||||||
|
${optionalString (config.services.cron.mailto != null) ''
|
||||||
MAILTO="${config.services.cron.mailto}"
|
MAILTO="${config.services.cron.mailto}"
|
||||||
|
''}
|
||||||
NIX_CONF_DIR=/etc/nix
|
NIX_CONF_DIR=/etc/nix
|
||||||
${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)}
|
${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)}
|
||||||
'';
|
'';
|
||||||
@ -34,21 +36,25 @@ in
|
|||||||
services.cron = {
|
services.cron = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Whether to enable the `vixie cron' daemon.";
|
description = "Whether to enable the Vixie cron daemon.";
|
||||||
};
|
};
|
||||||
|
|
||||||
mailto = mkOption {
|
mailto = mkOption {
|
||||||
default = "";
|
type = types.nullOr types.str;
|
||||||
description = " The job output will be mailed to this email address. ";
|
default = null;
|
||||||
|
description = "Email address to which job output will be mailed.";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemCronJobs = mkOption {
|
systemCronJobs = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
example = [
|
example = literalExample ''
|
||||||
"* * * * * test ls -l / > /tmp/cronout 2>&1"
|
[ "* * * * * test ls -l / > /tmp/cronout 2>&1"
|
||||||
"* * * * * eelco echo Hello World > /home/eelco/cronout"
|
"* * * * * eelco echo Hello World > /home/eelco/cronout"
|
||||||
];
|
]
|
||||||
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
A list of Cron jobs to be appended to the system-wide
|
A list of Cron jobs to be appended to the system-wide
|
||||||
crontab. See the manual page for crontab for the expected
|
crontab. See the manual page for crontab for the expected
|
||||||
|
@ -6,7 +6,7 @@ let
|
|||||||
|
|
||||||
cfg = config.services.fcron;
|
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 =
|
systemCronJobs =
|
||||||
''
|
''
|
||||||
@ -34,33 +34,40 @@ in
|
|||||||
services.fcron = {
|
services.fcron = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Whether to enable the `fcron' daemon.";
|
description = "Whether to enable the <command>fcron</command> daemon.";
|
||||||
};
|
};
|
||||||
|
|
||||||
allow = mkOption {
|
allow = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [ "all" ];
|
default = [ "all" ];
|
||||||
description = ''
|
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 {
|
deny = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Users forbidden from using fcron.";
|
description = "Users forbidden from using fcron.";
|
||||||
};
|
};
|
||||||
|
|
||||||
maxSerialJobs = mkOption {
|
maxSerialJobs = mkOption {
|
||||||
|
type = types.int;
|
||||||
default = 1;
|
default = 1;
|
||||||
description = "Maximum number of serial jobs which can run simultaneously.";
|
description = "Maximum number of serial jobs which can run simultaneously.";
|
||||||
};
|
};
|
||||||
|
|
||||||
queuelen = mkOption {
|
queuelen = mkOption {
|
||||||
default = "";
|
type = types.nullOr types.int;
|
||||||
description = "Number of jobs the serial queue and the lavg queue can contain - empty to net set this number (-q)";
|
default = null;
|
||||||
|
description = "Number of jobs the serial queue and the lavg queue can contain.";
|
||||||
};
|
};
|
||||||
|
|
||||||
systab = mkOption {
|
systab = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''The "system" crontab contents.'';
|
description = ''The "system" crontab contents.'';
|
||||||
};
|
};
|
||||||
|
@ -77,6 +77,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
packages = mkOption {
|
packages = mkOption {
|
||||||
|
type = types.listOf types.path;
|
||||||
default = [];
|
default = [];
|
||||||
description = ''
|
description = ''
|
||||||
Packages whose D-Bus configuration files should be included in
|
Packages whose D-Bus configuration files should be included in
|
||||||
|
@ -19,6 +19,7 @@ in
|
|||||||
services.nscd = {
|
services.nscd = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Whether to enable the Name Service Cache Daemon.";
|
description = "Whether to enable the Name Service Cache Daemon.";
|
||||||
};
|
};
|
||||||
|
@ -11,6 +11,7 @@ with pkgs.lib;
|
|||||||
services.mingetty = {
|
services.mingetty = {
|
||||||
|
|
||||||
greetingLine = mkOption {
|
greetingLine = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = ''<<< Welcome to NixOS ${config.system.nixosVersion} (\m) - \l >>>'';
|
default = ''<<< Welcome to NixOS ${config.system.nixosVersion} (\m) - \l >>>'';
|
||||||
description = ''
|
description = ''
|
||||||
Welcome line printed by mingetty.
|
Welcome line printed by mingetty.
|
||||||
@ -18,6 +19,7 @@ with pkgs.lib;
|
|||||||
};
|
};
|
||||||
|
|
||||||
helpLine = mkOption {
|
helpLine = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Help line printed by mingetty below the welcome line.
|
Help line printed by mingetty below the welcome line.
|
||||||
|
@ -17,6 +17,7 @@ in
|
|||||||
services.gpm = {
|
services.gpm = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable GPM, the General Purpose Mouse daemon,
|
Whether to enable GPM, the General Purpose Mouse daemon,
|
||||||
@ -25,6 +26,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
protocol = mkOption {
|
protocol = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "ps/2";
|
default = "ps/2";
|
||||||
description = "Mouse protocol to use.";
|
description = "Mouse protocol to use.";
|
||||||
};
|
};
|
||||||
|
@ -24,17 +24,18 @@ in
|
|||||||
services.xserver.desktopManager = {
|
services.xserver.desktopManager = {
|
||||||
|
|
||||||
session = mkOption {
|
session = mkOption {
|
||||||
|
internal = true;
|
||||||
default = [];
|
default = [];
|
||||||
example = singleton
|
example = singleton
|
||||||
{ name = "kde";
|
{ name = "kde";
|
||||||
bgSupport = true;
|
bgSupport = true;
|
||||||
start = "...";
|
start = "...";
|
||||||
};
|
};
|
||||||
description = "
|
description = ''
|
||||||
Internal option used to add some common line to desktop manager
|
Internal option used to add some common line to desktop manager
|
||||||
scripts before forwarding the value to the
|
scripts before forwarding the value to the
|
||||||
<varname>displayManager</varname>.
|
<varname>displayManager</varname>.
|
||||||
";
|
'';
|
||||||
apply = list: {
|
apply = list: {
|
||||||
list = map (d: d // {
|
list = map (d: d // {
|
||||||
manage = "desktop";
|
manage = "desktop";
|
||||||
|
@ -51,13 +51,13 @@ in
|
|||||||
|
|
||||||
services.xserver.desktopManager.kde4 = {
|
services.xserver.desktopManager.kde4 = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
|
||||||
description = "Enable the KDE 4 desktop environment.";
|
description = "Enable the KDE 4 desktop environment.";
|
||||||
};
|
};
|
||||||
|
|
||||||
phononBackends = mkOption {
|
phononBackends = mkOption {
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
default = ["gstreamer"];
|
default = ["gstreamer"];
|
||||||
example = ["gstreamer" "vlc"];
|
example = ["gstreamer" "vlc"];
|
||||||
description = "Which phonon multimedia backend kde should use";
|
description = "Which phonon multimedia backend kde should use";
|
||||||
|
@ -13,8 +13,8 @@ in
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
services.xserver.desktopManager.xfce.enable = mkOption {
|
services.xserver.desktopManager.xfce.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
|
||||||
description = "Enable the Xfce desktop environment.";
|
description = "Enable the Xfce desktop environment.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -166,16 +166,19 @@ in
|
|||||||
services.xserver.displayManager = {
|
services.xserver.displayManager = {
|
||||||
|
|
||||||
xauthBin = mkOption {
|
xauthBin = mkOption {
|
||||||
|
internal = true;
|
||||||
default = "${xorg.xauth}/bin/xauth";
|
default = "${xorg.xauth}/bin/xauth";
|
||||||
description = "Path to the <command>xauth</command> program used by display managers.";
|
description = "Path to the <command>xauth</command> program used by display managers.";
|
||||||
};
|
};
|
||||||
|
|
||||||
xserverBin = mkOption {
|
xserverBin = mkOption {
|
||||||
|
type = types.path;
|
||||||
default = "${xorg.xorgserver}/bin/X";
|
default = "${xorg.xorgserver}/bin/X";
|
||||||
description = "Path to the X server used by display managers.";
|
description = "Path to the X server used by display managers.";
|
||||||
};
|
};
|
||||||
|
|
||||||
xserverArgs = mkOption {
|
xserverArgs = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
example = [ "-ac" "-logverbose" "-nolisten tcp" ];
|
example = [ "-ac" "-logverbose" "-nolisten tcp" ];
|
||||||
description = "List of arguments for the X server.";
|
description = "List of arguments for the X server.";
|
||||||
@ -183,16 +186,17 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
sessionCommands = mkOption {
|
sessionCommands = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example =
|
example =
|
||||||
''
|
''
|
||||||
xmessage "Hello World!" &
|
xmessage "Hello World!" &
|
||||||
'';
|
'';
|
||||||
type = types.string;
|
|
||||||
description = "Shell commands executed just before the window or desktop manager is started.";
|
description = "Shell commands executed just before the window or desktop manager is started.";
|
||||||
};
|
};
|
||||||
|
|
||||||
desktopManagerHandlesLidAndPower = mkOption {
|
desktopManagerHandlesLidAndPower = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether the display manager should prevent systemd from handling
|
Whether the display manager should prevent systemd from handling
|
||||||
@ -256,6 +260,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment = mkOption {
|
environment = mkOption {
|
||||||
|
type = types.attrsOf types.unspecified;
|
||||||
default = {};
|
default = {};
|
||||||
example = { SLIM_CFGFILE = /etc/slim.conf; };
|
example = { SLIM_CFGFILE = /etc/slim.conf; };
|
||||||
description = "Additional environment variables needed by the display manager.";
|
description = "Additional environment variables needed by the display manager.";
|
||||||
|
@ -40,7 +40,7 @@ let
|
|||||||
[X-*-Greeter]
|
[X-*-Greeter]
|
||||||
HiddenUsers=root,nixbld1,nixbld2,nixbld3,nixbld4,nixbld5,nixbld6,nixbld7,nixbld8,nixbld9,nixbld10
|
HiddenUsers=root,nixbld1,nixbld2,nixbld3,nixbld4,nixbld5,nixbld6,nixbld7,nixbld8,nixbld9,nixbld10
|
||||||
PluginsLogin=${kdebase_workspace}/lib/kde4/kgreet_classic.so
|
PluginsLogin=${kdebase_workspace}/lib/kde4/kgreet_classic.so
|
||||||
${optionalString (cfg.themeDirectory != "")
|
${optionalString (cfg.themeDirectory != null)
|
||||||
''
|
''
|
||||||
UseTheme=true
|
UseTheme=true
|
||||||
Theme=${cfg.themeDirectory}
|
Theme=${cfg.themeDirectory}
|
||||||
@ -78,6 +78,7 @@ in
|
|||||||
services.xserver.displayManager.kdm = {
|
services.xserver.displayManager.kdm = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable the KDE display manager.
|
Whether to enable the KDE display manager.
|
||||||
@ -85,6 +86,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
enableXDMCP = mkOption {
|
enableXDMCP = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable XDMCP, which allows remote logins.
|
Whether to enable XDMCP, which allows remote logins.
|
||||||
@ -92,7 +94,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
themeDirectory = mkOption {
|
themeDirectory = mkOption {
|
||||||
default = "";
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
The path to a KDM theme directory. This theme
|
The path to a KDM theme directory. This theme
|
||||||
will be used by the KDM greeter.
|
will be used by the KDM greeter.
|
||||||
@ -100,6 +103,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
setupScript = mkOption {
|
setupScript = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
The path to a KDM setup script. This script is run as root just
|
The path to a KDM setup script. This script is run as root just
|
||||||
@ -109,6 +113,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Options appended to <filename>kdmrc</filename>, the
|
Options appended to <filename>kdmrc</filename>, the
|
||||||
|
@ -16,7 +16,7 @@ let
|
|||||||
login_cmd exec ${pkgs.stdenv.shell} ${dmcfg.session.script} "%session"
|
login_cmd exec ${pkgs.stdenv.shell} ${dmcfg.session.script} "%session"
|
||||||
halt_cmd ${config.systemd.package}/sbin/shutdown -h now
|
halt_cmd ${config.systemd.package}/sbin/shutdown -h now
|
||||||
reboot_cmd ${config.systemd.package}/sbin/shutdown -r 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"}
|
${optionalString cfg.autoLogin "auto_login yes"}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -45,6 +45,7 @@ in
|
|||||||
services.xserver.displayManager.slim = {
|
services.xserver.displayManager.slim = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = config.services.xserver.enable;
|
default = config.services.xserver.enable;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable SLiM as the display manager.
|
Whether to enable SLiM as the display manager.
|
||||||
@ -52,11 +53,14 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
theme = mkOption {
|
theme = mkOption {
|
||||||
|
type = types.nullOr types.path;
|
||||||
default = null;
|
default = null;
|
||||||
example = pkgs.fetchurl {
|
example = literalExample ''
|
||||||
|
pkgs.fetchurl {
|
||||||
url = http://download.berlios.de/slim/slim-wave.tar.gz;
|
url = http://download.berlios.de/slim/slim-wave.tar.gz;
|
||||||
sha256 = "0ndr419i5myzcylvxb89m9grl2xyq6fbnyc3lkd711mzlmnnfxdy";
|
sha256 = "0ndr419i5myzcylvxb89m9grl2xyq6fbnyc3lkd711mzlmnnfxdy";
|
||||||
};
|
}
|
||||||
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
The theme for the SLiM login manager. If not specified, SLiM's
|
The theme for the SLiM login manager. If not specified, SLiM's
|
||||||
default theme is used. See <link
|
default theme is used. See <link
|
||||||
@ -66,7 +70,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
defaultUser = mkOption {
|
defaultUser = mkOption {
|
||||||
default = "";
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
example = "login";
|
example = "login";
|
||||||
description = ''
|
description = ''
|
||||||
The default user to load. If you put a username here you
|
The default user to load. If you put a username here you
|
||||||
@ -76,8 +81,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
autoLogin = mkOption {
|
autoLogin = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
|
||||||
description = ''
|
description = ''
|
||||||
Automatically log in as the default user.
|
Automatically log in as the default user.
|
||||||
'';
|
'';
|
||||||
|
@ -24,6 +24,7 @@ in
|
|||||||
services.xserver.windowManager = {
|
services.xserver.windowManager = {
|
||||||
|
|
||||||
session = mkOption {
|
session = mkOption {
|
||||||
|
internal = true;
|
||||||
default = [];
|
default = [];
|
||||||
example = [{
|
example = [{
|
||||||
name = "wmii";
|
name = "wmii";
|
||||||
|
@ -17,6 +17,7 @@ in
|
|||||||
services.xfs = {
|
services.xfs = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Whether to enable the X Font Server.";
|
description = "Whether to enable the X Font Server.";
|
||||||
};
|
};
|
||||||
@ -28,10 +29,12 @@ in
|
|||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf config.services.xfs.enable (
|
config = mkIf config.services.xfs.enable {
|
||||||
mkAssert config.fonts.enableFontDir "
|
|
||||||
Please enable fontDir (fonts.enableFontDir) to use xfs.
|
assertions = singleton
|
||||||
" {
|
{ assertion = config.fonts.enableFontDir;
|
||||||
|
message = "Please enable fonts.enableFontDir to use the X Font Server.";
|
||||||
|
};
|
||||||
|
|
||||||
jobs.xfs =
|
jobs.xfs =
|
||||||
{ description = "X Font Server";
|
{ description = "X Font Server";
|
||||||
@ -41,6 +44,6 @@ in
|
|||||||
exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
|
exec = "${pkgs.xorg.xfs}/bin/xfs -config ${configFile}";
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -137,6 +137,7 @@ in
|
|||||||
services.xserver = {
|
services.xserver = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable the X server.
|
Whether to enable the X server.
|
||||||
@ -144,6 +145,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
autorun = mkOption {
|
autorun = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to start the X server automatically.
|
Whether to start the X server automatically.
|
||||||
@ -151,6 +153,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
exportConfiguration = mkOption {
|
exportConfiguration = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to symlink the X server configuration under
|
Whether to symlink the X server configuration under
|
||||||
@ -159,6 +162,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
enableTCP = mkOption {
|
enableTCP = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to allow the X server to accept TCP connections.
|
Whether to allow the X server to accept TCP connections.
|
||||||
@ -166,12 +170,14 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
modules = mkOption {
|
modules = mkOption {
|
||||||
|
type = types.listOf types.path;
|
||||||
default = [];
|
default = [];
|
||||||
example = [ pkgs.xf86_input_wacom ];
|
example = [ pkgs.xf86_input_wacom ];
|
||||||
description = "Packages to be added to the module search path of the X server.";
|
description = "Packages to be added to the module search path of the X server.";
|
||||||
};
|
};
|
||||||
|
|
||||||
resolutions = mkOption {
|
resolutions = mkOption {
|
||||||
|
type = types.listOf types.attrs;
|
||||||
default = [];
|
default = [];
|
||||||
example = [ { x = 1600; y = 1200; } { x = 1024; y = 786; } ];
|
example = [ { x = 1600; y = 1200; } { x = 1024; y = 786; } ];
|
||||||
description = ''
|
description = ''
|
||||||
@ -182,6 +188,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
videoDriver = mkOption {
|
videoDriver = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
example = "i810";
|
example = "i810";
|
||||||
description = ''
|
description = ''
|
||||||
@ -192,6 +199,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
videoDrivers = mkOption {
|
videoDrivers = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
# !!! We'd like "nv" here, but it segfaults the X server.
|
# !!! We'd like "nv" here, but it segfaults the X server.
|
||||||
default = [ "ati" "cirrus" "intel" "vesa" "vmware" ];
|
default = [ "ati" "cirrus" "intel" "vesa" "vmware" ];
|
||||||
example = [ "vesa" ];
|
example = [ "vesa" ];
|
||||||
@ -203,8 +211,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
vaapiDrivers = mkOption {
|
vaapiDrivers = mkOption {
|
||||||
|
type = types.listOf types.path;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
defaultText = "[ pkgs.vaapiIntel pkgs.vaapiVdpau ]";
|
|
||||||
example = "[ pkgs.vaapiIntel pkgs.vaapiVdpau ]";
|
example = "[ pkgs.vaapiIntel pkgs.vaapiVdpau ]";
|
||||||
description = ''
|
description = ''
|
||||||
Packages providing libva acceleration drivers.
|
Packages providing libva acceleration drivers.
|
||||||
@ -212,6 +220,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
driSupport = mkOption {
|
driSupport = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable accelerated OpenGL rendering through the
|
Whether to enable accelerated OpenGL rendering through the
|
||||||
@ -220,6 +229,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
driSupport32Bit = mkOption {
|
driSupport32Bit = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
On 64-bit systems, whether to support Direct Rendering for
|
On 64-bit systems, whether to support Direct Rendering for
|
||||||
@ -230,6 +240,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
s3tcSupport = mkOption {
|
s3tcSupport = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Make S3TC(S3 Texture Compression) via libtxc_dxtn available
|
Make S3TC(S3 Texture Compression) via libtxc_dxtn available
|
||||||
@ -241,6 +252,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
startOpenSSHAgent = mkOption {
|
startOpenSSHAgent = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to start the OpenSSH agent when you log in. The OpenSSH agent
|
Whether to start the OpenSSH agent when you log in. The OpenSSH agent
|
||||||
@ -251,6 +263,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
startGnuPGAgent = mkOption {
|
startGnuPGAgent = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to start the GnuPG agent when you log in. The GnuPG agent
|
Whether to start the GnuPG agent when you log in. The GnuPG agent
|
||||||
@ -261,6 +274,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
layout = mkOption {
|
layout = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "us";
|
default = "us";
|
||||||
description = ''
|
description = ''
|
||||||
Keyboard layout.
|
Keyboard layout.
|
||||||
@ -268,6 +282,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
xkbModel = mkOption {
|
xkbModel = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "pc104";
|
default = "pc104";
|
||||||
example = "presario";
|
example = "presario";
|
||||||
description = ''
|
description = ''
|
||||||
@ -276,6 +291,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
xkbOptions = mkOption {
|
xkbOptions = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "terminate:ctrl_alt_bksp";
|
default = "terminate:ctrl_alt_bksp";
|
||||||
example = "grp:caps_toggle, grp_led:scroll";
|
example = "grp:caps_toggle, grp_led:scroll";
|
||||||
description = ''
|
description = ''
|
||||||
@ -284,6 +300,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
xkbVariant = mkOption {
|
xkbVariant = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "";
|
default = "";
|
||||||
example = "colemak";
|
example = "colemak";
|
||||||
description = ''
|
description = ''
|
||||||
@ -292,6 +309,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkOption {
|
config = mkOption {
|
||||||
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
The contents of the configuration file of the X server
|
The contents of the configuration file of the X server
|
||||||
(<filename>xorg.conf</filename>).
|
(<filename>xorg.conf</filename>).
|
||||||
@ -299,12 +317,14 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
deviceSection = mkOption {
|
deviceSection = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = "VideoRAM 131072";
|
example = "VideoRAM 131072";
|
||||||
description = "Contents of the first Device section of the X server configuration file.";
|
description = "Contents of the first Device section of the X server configuration file.";
|
||||||
};
|
};
|
||||||
|
|
||||||
screenSection = mkOption {
|
screenSection = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = ''
|
example = ''
|
||||||
Option "RandRRotation" "on"
|
Option "RandRRotation" "on"
|
||||||
@ -313,6 +333,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
monitorSection = mkOption {
|
monitorSection = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = "HorizSync 28-49";
|
example = "HorizSync 28-49";
|
||||||
description = "Contents of the first Monitor section of the X server configuration file.";
|
description = "Contents of the first Monitor section of the X server configuration file.";
|
||||||
@ -334,6 +355,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
moduleSection = mkOption {
|
moduleSection = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example =
|
example =
|
||||||
''
|
''
|
||||||
@ -344,6 +366,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
serverLayoutSection = mkOption {
|
serverLayoutSection = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example =
|
example =
|
||||||
''
|
''
|
||||||
@ -353,36 +376,40 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
extraDisplaySettings = mkOption {
|
extraDisplaySettings = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
example = "Virtual 2048 2048";
|
example = "Virtual 2048 2048";
|
||||||
description = "Lines to be added to every Display subsection of the Screen section.";
|
description = "Lines to be added to every Display subsection of the Screen section.";
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultDepth = mkOption {
|
defaultDepth = mkOption {
|
||||||
|
type = types.int;
|
||||||
default = 0;
|
default = 0;
|
||||||
example = 8;
|
example = 8;
|
||||||
description = "Default colour depth.";
|
description = "Default colour depth.";
|
||||||
};
|
};
|
||||||
|
|
||||||
useXFS = mkOption {
|
useXFS = mkOption {
|
||||||
|
# FIXME: what's the type of this option?
|
||||||
default = false;
|
default = false;
|
||||||
example = "unix/:7100";
|
example = "unix/:7100";
|
||||||
description = "Determines how to connect to the X Font Server.";
|
description = "Determines how to connect to the X Font Server.";
|
||||||
};
|
};
|
||||||
|
|
||||||
tty = mkOption {
|
tty = mkOption {
|
||||||
|
type = types.int;
|
||||||
default = 7;
|
default = 7;
|
||||||
example = 9;
|
|
||||||
description = "Virtual console for the X server.";
|
description = "Virtual console for the X server.";
|
||||||
};
|
};
|
||||||
|
|
||||||
display = mkOption {
|
display = mkOption {
|
||||||
|
type = types.int;
|
||||||
default = 0;
|
default = 0;
|
||||||
example = 1;
|
|
||||||
description = "Display number for the X server.";
|
description = "Display number for the X server.";
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualScreen = mkOption {
|
virtualScreen = mkOption {
|
||||||
|
type = types.nullOr types.attrs;
|
||||||
default = null;
|
default = null;
|
||||||
example = { x = 2048; y = 2048; };
|
example = { x = 2048; y = 2048; };
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -92,8 +92,7 @@ let
|
|||||||
systemd = config.systemd.package;
|
systemd = config.systemd.package;
|
||||||
|
|
||||||
inherit children;
|
inherit children;
|
||||||
kernelParams =
|
kernelParams = config.boot.kernelParams;
|
||||||
config.boot.kernelParams ++ config.boot.extraKernelParams;
|
|
||||||
installBootLoader =
|
installBootLoader =
|
||||||
config.system.build.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";
|
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 {
|
system.copySystemConfiguration = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
If enabled, copies the NixOS configuration file
|
If enabled, copies the NixOS configuration file
|
||||||
|
@ -24,7 +24,7 @@ in
|
|||||||
# We don't want to evaluate all of linuxPackages for the manual
|
# We don't want to evaluate all of linuxPackages for the manual
|
||||||
# - some of it might not even evaluate correctly.
|
# - some of it might not even evaluate correctly.
|
||||||
defaultText = "pkgs.linuxPackages";
|
defaultText = "pkgs.linuxPackages";
|
||||||
example = "pkgs.linuxPackages_2_6_25";
|
example = literalExample "pkgs.linuxPackages_2_6_25";
|
||||||
description = ''
|
description = ''
|
||||||
This option allows you to override the Linux kernel used by
|
This option allows you to override the Linux kernel used by
|
||||||
NixOS. Since things like external kernel module packages are
|
NixOS. Since things like external kernel module packages are
|
||||||
@ -40,18 +40,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot.kernelParams = mkOption {
|
boot.kernelParams = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
description = ''
|
description = "Parameters added to the kernel command line.";
|
||||||
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.";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.consoleLogLevel = mkOption {
|
boot.consoleLogLevel = mkOption {
|
||||||
@ -65,6 +56,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot.vesa = mkOption {
|
boot.vesa = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to activate VESA video mode on boot.
|
Whether to activate VESA video mode on boot.
|
||||||
@ -72,13 +64,14 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot.extraModulePackages = mkOption {
|
boot.extraModulePackages = mkOption {
|
||||||
|
type = types.listOf types.path;
|
||||||
default = [];
|
default = [];
|
||||||
# !!! example = [pkgs.nvidia_x11];
|
example = literalExample "[ pkgs.linuxPackages.nvidia_x11 ]";
|
||||||
description = "A list of additional packages supplying kernel modules.";
|
description = "A list of additional packages supplying kernel modules.";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.kernelModules = mkOption {
|
boot.kernelModules = mkOption {
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
description = ''
|
description = ''
|
||||||
The set of kernel modules to be loaded in the second stage of
|
The set of kernel modules to be loaded in the second stage of
|
||||||
@ -90,7 +83,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = mkOption {
|
boot.initrd.availableKernelModules = mkOption {
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
example = [ "sata_nv" "ext3" ];
|
example = [ "sata_nv" "ext3" ];
|
||||||
description = ''
|
description = ''
|
||||||
@ -111,7 +104,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.kernelModules = mkOption {
|
boot.initrd.kernelModules = mkOption {
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "List of modules that are always loaded by the initrd.";
|
description = "List of modules that are always loaded by the initrd.";
|
||||||
};
|
};
|
||||||
|
@ -78,7 +78,7 @@ in
|
|||||||
devices = mkOption {
|
devices = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
example = [ "/dev/hda" ];
|
example = [ "/dev/hda" ];
|
||||||
type = types.listOf types.string;
|
type = types.listOf types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The devices on which the boot loader, GRUB, will be
|
The devices on which the boot loader, GRUB, will be
|
||||||
installed. Can be used instead of <literal>device</literal> to
|
installed. Can be used instead of <literal>device</literal> to
|
||||||
|
@ -36,6 +36,7 @@ with pkgs.lib;
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot.blacklistedKernelModules = mkOption {
|
boot.blacklistedKernelModules = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
example = [ "cirrusfb" "i2c_piix4" ];
|
example = [ "cirrusfb" "i2c_piix4" ];
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -243,39 +243,39 @@ in
|
|||||||
default = true;
|
default = true;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = ''
|
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 {
|
boot.initrd.mdadmConf = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = with types; string;
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Contents of /etc/mdadm.conf at initrd.
|
Contents of <filename>/etc/mdadm.conf</filename> in stage 1.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.preLVMCommands = mkOption {
|
boot.initrd.preLVMCommands = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = with types; string;
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Shell commands to be executed immediately before lvm discovery.
|
Shell commands to be executed immediately before LVM discovery.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.postDeviceCommands = mkOption {
|
boot.initrd.postDeviceCommands = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = with types; string;
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Shell commands to be executed immediately after stage 1 of the
|
Shell commands to be executed immediately after stage 1 of the
|
||||||
boot has loaded kernel modules and created device nodes in
|
boot has loaded kernel modules and created device nodes in
|
||||||
/dev.
|
<filename>/dev</filename>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.postMountCommands = mkOption {
|
boot.initrd.postMountCommands = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = with types; string;
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Shell commands to be executed immediately after the stage 1
|
Shell commands to be executed immediately after the stage 1
|
||||||
filesystems have been mounted.
|
filesystems have been mounted.
|
||||||
@ -285,7 +285,7 @@ in
|
|||||||
boot.initrd.extraUtilsCommands = mkOption {
|
boot.initrd.extraUtilsCommands = mkOption {
|
||||||
internal = true;
|
internal = true;
|
||||||
default = "";
|
default = "";
|
||||||
type = with types; string;
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Shell commands to be executed in the builder of the
|
Shell commands to be executed in the builder of the
|
||||||
extra-utils derivation. This can be used to provide
|
extra-utils derivation. This can be used to provide
|
||||||
@ -296,7 +296,7 @@ in
|
|||||||
boot.initrd.extraUtilsCommandsTest = mkOption {
|
boot.initrd.extraUtilsCommandsTest = mkOption {
|
||||||
internal = true;
|
internal = true;
|
||||||
default = "";
|
default = "";
|
||||||
type = with types; string;
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Shell commands to be executed in the builder of the
|
Shell commands to be executed in the builder of the
|
||||||
extra-utils derivation after patchelf has done its
|
extra-utils derivation after patchelf has done its
|
||||||
@ -306,12 +306,10 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.compressor = mkOption {
|
boot.initrd.compressor = mkOption {
|
||||||
|
internal = true;
|
||||||
default = "gzip -9";
|
default = "gzip -9";
|
||||||
|
type = types.str;
|
||||||
type = types.string;
|
description = "The compressor to use on the initrd image.";
|
||||||
|
|
||||||
description = "The compressor to use on the initrd";
|
|
||||||
|
|
||||||
example = "xz";
|
example = "xz";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ in
|
|||||||
postBootCommands = mkOption {
|
postBootCommands = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
example = "rm -f /var/log/messages";
|
example = "rm -f /var/log/messages";
|
||||||
type = types.string;
|
type = types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Shell commands to be executed just before systemd is started.
|
Shell commands to be executed just before systemd is started.
|
||||||
'';
|
'';
|
||||||
@ -80,10 +80,10 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
cleanTmpDir = mkOption {
|
cleanTmpDir = mkOption {
|
||||||
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
|
||||||
description = ''
|
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 {
|
target = mkOption {
|
||||||
|
type = types.str;
|
||||||
description = ''
|
description = ''
|
||||||
Name of symlink (relative to
|
Name of symlink (relative to
|
||||||
<filename>/etc</filename>). Defaults to the attribute
|
<filename>/etc</filename>). Defaults to the attribute
|
||||||
@ -66,7 +67,7 @@ in
|
|||||||
|
|
||||||
text = mkOption {
|
text = mkOption {
|
||||||
default = null;
|
default = null;
|
||||||
type = types.nullOr types.string;
|
type = types.nullOr types.lines;
|
||||||
description = "Text of the file.";
|
description = "Text of the file.";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -76,6 +77,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
mode = mkOption {
|
mode = mkOption {
|
||||||
|
type = types.str;
|
||||||
default = "symlink";
|
default = "symlink";
|
||||||
example = "0600";
|
example = "0600";
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -8,9 +8,9 @@ with pkgs.lib;
|
|||||||
options = {
|
options = {
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = mkOption {
|
powerManagement.cpuFreqGovernor = mkOption {
|
||||||
default = "";
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
example = "ondemand";
|
example = "ondemand";
|
||||||
type = types.str;
|
|
||||||
description = ''
|
description = ''
|
||||||
Configure the governor used to regulate the frequence of the
|
Configure the governor used to regulate the frequence of the
|
||||||
available CPUs. By default, the kernel configures the
|
available CPUs. By default, the kernel configures the
|
||||||
@ -23,7 +23,7 @@ with pkgs.lib;
|
|||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf (config.powerManagement.cpuFreqGovernor != "") {
|
config = mkIf (config.powerManagement.cpuFreqGovernor != null) {
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.cpufrequtils ];
|
environment.systemPackages = [ pkgs.cpufrequtils ];
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ in
|
|||||||
{ environment.systemPackages = [ pkgs.miniupnpd ];
|
{ environment.systemPackages = [ pkgs.miniupnpd ];
|
||||||
virtualisation.vlans = [ 1 2 ];
|
virtualisation.vlans = [ 1 2 ];
|
||||||
networking.nat.enable = true;
|
networking.nat.enable = true;
|
||||||
networking.nat.internalIPs = "192.168.2.0/24";
|
networking.nat.internalIPs = [ "192.168.2.0/24" ];
|
||||||
networking.nat.externalInterface = "eth1";
|
networking.nat.externalInterface = "eth1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{ virtualisation.vlans = [ 2 1 ];
|
{ virtualisation.vlans = [ 2 1 ];
|
||||||
networking.nat.enable = true;
|
networking.nat.enable = true;
|
||||||
networking.nat.internalIPs = "192.168.1.0/24";
|
networking.nat.internalIPs = [ "192.168.1.0/24" ];
|
||||||
networking.nat.externalInterface = "eth1";
|
networking.nat.externalInterface = "eth1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user