summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-07 11:05:33 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-07 11:07:06 +0200
commit8ec44f343d0d865bf0c8aad5dac4b5aec1092b0b (patch)
treeeb25094f8aea6334a754151fe15167499344ea8b
parent7459f6fa38e30ebb1f040c114c98ac2b6715eed3 (diff)
downloadnixlib-8ec44f343d0d865bf0c8aad5dac4b5aec1092b0b.tar
nixlib-8ec44f343d0d865bf0c8aad5dac4b5aec1092b0b.tar.gz
nixlib-8ec44f343d0d865bf0c8aad5dac4b5aec1092b0b.tar.bz2
nixlib-8ec44f343d0d865bf0c8aad5dac4b5aec1092b0b.tar.lz
nixlib-8ec44f343d0d865bf0c8aad5dac4b5aec1092b0b.tar.xz
nixlib-8ec44f343d0d865bf0c8aad5dac4b5aec1092b0b.tar.zst
nixlib-8ec44f343d0d865bf0c8aad5dac4b5aec1092b0b.zip
Add some missing option types
-rw-r--r--modules/system/boot/loader/grub/grub.nix20
1 files 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: <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
@@ -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
@@ -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.
         '';