From 8ec44f343d0d865bf0c8aad5dac4b5aec1092b0b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 7 Oct 2013 11:05:33 +0200 Subject: Add some missing option types --- modules/system/boot/loader/grub/grub.nix | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/modules/system/boot/loader/grub/grub.nix b/modules/system/boot/loader/grub/grub.nix index 85845cd2cd9f..b643fa6b5bfb 100644 --- a/modules/system/boot/loader/grub/grub.nix +++ b/modules/system/boot/loader/grub/grub.nix @@ -45,6 +45,7 @@ in enable = mkOption { default = true; + type = types.bool; description = '' Whether to enable the GNU GRUB boot loader. ''; @@ -53,16 +54,17 @@ in version = mkOption { default = 1; example = 2; + type = types.int; description = '' - The version of GRUB to use: 1 for GRUB Legacy - (versions 0.9x), or 2 for GRUB 2. + The version of GRUB to use: 1 for GRUB + Legacy (versions 0.9x), or 2 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 nodev means that a GRUB @@ -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 device to @@ -92,6 +94,7 @@ in configurationName = mkOption { default = ""; example = "Stable 2.6.21"; + type = types.uniq types.string; description = '' GRUB entry name instead of default. ''; @@ -99,6 +102,7 @@ in extraPrepareConfig = mkOption { default = ""; + type = types.lines; description = '' Additional bash commands to be run at the script that prepares the grub menu entries. @@ -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. @@ -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. @@ -125,6 +131,7 @@ in extraEntries = mkOption { default = ""; + type = types.lines; example = '' # GRUB 1 example (not GRUB 2 compatible) title Windows @@ -145,6 +152,7 @@ in extraEntriesBeforeNixOS = mkOption { default = false; + type = types.bool; description = '' Whether extraEntries are included before the default option. ''; @@ -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. @@ -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 @@ -201,6 +211,7 @@ in timeout = mkOption { default = 5; + type = types.int; description = '' Timeout (in seconds) until GRUB boots the default menu item. ''; @@ -208,6 +219,7 @@ in default = mkOption { default = 0; + type = types.int; description = '' Index of the default menu item to be booted. ''; -- cgit 1.4.1