Skip to content
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.

Commit

Permalink
Add some missing option types
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Oct 7, 2013
1 parent 7459f6f commit 8ec44f3
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions modules/system/boot/loader/grub/grub.nix
Expand Up @@ -45,6 +45,7 @@ in

enable = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable the GNU GRUB boot loader.
'';
Expand All @@ -53,16 +54,17 @@ in
version = mkOption {
default = 1;
example = 2;
type = types.int;
description = ''
The version of GRUB to use: <literal>1</literal> for GRUB Legacy
(versions 0.9x), or <literal>2</literal> for GRUB 2.
The version of GRUB to use: <literal>1</literal> for GRUB
Legacy (versions 0.9x), or <literal>2</literal> for GRUB 2.
'';
};

device = mkOption {
default = "";
example = "/dev/hda";
type = with pkgs.lib.types; uniq string;
type = types.uniq types.string;
description = ''
The device on which the GRUB boot loader will be installed.
The special value <literal>nodev</literal> means that a GRUB
Expand All @@ -75,7 +77,7 @@ in
devices = mkOption {
default = [];
example = [ "/dev/hda" ];
type = with pkgs.lib.types; listOf string;
type = types.listOf types.string;
description = ''
The devices on which the boot loader, GRUB, will be
installed. Can be used instead of <literal>device</literal> to
Expand All @@ -92,13 +94,15 @@ in
configurationName = mkOption {
default = "";
example = "Stable 2.6.21";
type = types.uniq types.string;
description = ''
GRUB entry name instead of default.
'';
};

extraPrepareConfig = mkOption {
default = "";
type = types.lines;
description = ''
Additional bash commands to be run at the script that
prepares the grub menu entries.
Expand All @@ -108,6 +112,7 @@ in
extraConfig = mkOption {
default = "";
example = "serial; terminal_output.serial";
type = types.lines;
description = ''
Additional GRUB commands inserted in the configuration file
just before the menu entries.
Expand All @@ -117,6 +122,7 @@ in
extraPerEntryConfig = mkOption {
default = "";
example = "root (hd0)";
type = types.lines;
description = ''
Additional GRUB commands inserted in the configuration file
at the start of each NixOS menu entry.
Expand All @@ -125,6 +131,7 @@ in

extraEntries = mkOption {
default = "";
type = types.lines;
example = ''
# GRUB 1 example (not GRUB 2 compatible)
title Windows
Expand All @@ -145,6 +152,7 @@ in

extraEntriesBeforeNixOS = mkOption {
default = false;
type = types.bool;
description = ''
Whether extraEntries are included before the default option.
'';
Expand Down Expand Up @@ -184,6 +192,7 @@ in
configurationLimit = mkOption {
default = 100;
example = 120;
type = types.int;
description = ''
Maximum of configurations in boot menu. GRUB has problems when
there are too many entries.
Expand All @@ -192,6 +201,7 @@ in

copyKernels = mkOption {
default = false;
type = types.bool;
description = ''
Whether the GRUB menu builder should copy kernels and initial
ramdisks to /boot. This is done automatically if /boot is
Expand All @@ -201,13 +211,15 @@ in

timeout = mkOption {
default = 5;
type = types.int;
description = ''
Timeout (in seconds) until GRUB boots the default menu item.
'';
};

default = mkOption {
default = 0;
type = types.int;
description = ''
Index of the default menu item to be booted.
'';
Expand Down

0 comments on commit 8ec44f3

Please sign in to comment.