summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/grub/grub.nix
diff options
context:
space:
mode:
authorEric Sagnes <eric.sagnes@gmail.com>2016-09-11 18:51:48 +0900
committerEric Sagnes <eric.sagnes@gmail.com>2016-09-13 12:53:12 +0900
commit55e437806a2875d1f588ebadafaf66ff0d1d9b22 (patch)
tree37e057a05e281e2a6bcc627cbd4024cf69858c14 /nixos/modules/system/boot/loader/grub/grub.nix
parent03ee88f666ce32755eae06a2377de6a7810cd2ac (diff)
downloadnixlib-55e437806a2875d1f588ebadafaf66ff0d1d9b22.tar
nixlib-55e437806a2875d1f588ebadafaf66ff0d1d9b22.tar.gz
nixlib-55e437806a2875d1f588ebadafaf66ff0d1d9b22.tar.bz2
nixlib-55e437806a2875d1f588ebadafaf66ff0d1d9b22.tar.lz
nixlib-55e437806a2875d1f588ebadafaf66ff0d1d9b22.tar.xz
nixlib-55e437806a2875d1f588ebadafaf66ff0d1d9b22.tar.zst
nixlib-55e437806a2875d1f588ebadafaf66ff0d1d9b22.zip
grub module: optionSet -> submodule
Diffstat (limited to 'nixos/modules/system/boot/loader/grub/grub.nix')
-rw-r--r--nixos/modules/system/boot/loader/grub/grub.nix86
1 files changed, 43 insertions, 43 deletions
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index 61c34cc2f034..e7b98a9f8506 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -131,51 +131,51 @@ in
           to the respective devices corresponding to those partitions.
         '';
 
-        type = types.listOf types.optionSet;
+        type = with types; listOf (submodule {
+          options = {
+
+            path = mkOption {
+              example = "/boot1";
+              type = types.str;
+              description = ''
+                The path to the boot directory where GRUB will be written. Generally
+                this boot path should double as an EFI path.
+              '';
+            };
+
+            efiSysMountPoint = mkOption {
+              default = null;
+              example = "/boot1/efi";
+              type = types.nullOr types.str;
+              description = ''
+                The path to the efi system mount point. Usually this is the same
+                partition as the above path and can be left as null.
+              '';
+            };
+
+            efiBootloaderId = mkOption {
+              default = null;
+              example = "NixOS-fsid";
+              type = types.nullOr types.str;
+              description = ''
+                The id of the bootloader to store in efi nvram.
+                The default is to name it NixOS and append the path or efiSysMountPoint.
+                This is only used if <literal>boot.loader.efi.canTouchEfiVariables</literal> is true.
+              '';
+            };
+
+            devices = mkOption {
+              default = [ ];
+              example = [ "/dev/sda" "/dev/sdb" ];
+              type = types.listOf types.str;
+              description = ''
+                The path to the devices which will have the GRUB MBR written.
+                Note these are typically device paths and not paths to partitions.
+              '';
+            };
 
-        options = {
-
-          path = mkOption {
-            example = "/boot1";
-            type = types.str;
-            description = ''
-              The path to the boot directory where GRUB will be written. Generally
-              this boot path should double as an EFI path.
-            '';
-          };
-
-          efiSysMountPoint = mkOption {
-            default = null;
-            example = "/boot1/efi";
-            type = types.nullOr types.str;
-            description = ''
-              The path to the efi system mount point. Usually this is the same
-              partition as the above path and can be left as null.
-            '';
-          };
-
-          efiBootloaderId = mkOption {
-            default = null;
-            example = "NixOS-fsid";
-            type = types.nullOr types.str;
-            description = ''
-              The id of the bootloader to store in efi nvram.
-              The default is to name it NixOS and append the path or efiSysMountPoint.
-              This is only used if <literal>boot.loader.efi.canTouchEfiVariables</literal> is true.
-            '';
           };
-
-          devices = mkOption {
-            default = [ ];
-            example = [ "/dev/sda" "/dev/sdb" ];
-            type = types.listOf types.str;
-            description = ''
-              The path to the devices which will have the GRUB MBR written.
-              Note these are typically device paths and not paths to partitions.
-            '';
-          };
-
-        };
+        });
       };
 
       configurationName = mkOption {