about summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/grub/grub.nix
diff options
context:
space:
mode:
authorAndrew R. M <andrewmiller237@gmail.com>2016-10-08 23:59:42 -0400
committerAndrew R. M <andrewmiller237@gmail.com>2016-11-03 05:50:42 -0400
commita31bf8961a3f0b2cfe28e0240698cd19258c24f5 (patch)
treedaf02658633d591513afa40b1bb99d4db18acf66 /nixos/modules/system/boot/loader/grub/grub.nix
parent26256b7cea2957e457a3f9d897c8eb4e3e6f134f (diff)
downloadnixlib-a31bf8961a3f0b2cfe28e0240698cd19258c24f5.tar
nixlib-a31bf8961a3f0b2cfe28e0240698cd19258c24f5.tar.gz
nixlib-a31bf8961a3f0b2cfe28e0240698cd19258c24f5.tar.bz2
nixlib-a31bf8961a3f0b2cfe28e0240698cd19258c24f5.tar.lz
nixlib-a31bf8961a3f0b2cfe28e0240698cd19258c24f5.tar.xz
nixlib-a31bf8961a3f0b2cfe28e0240698cd19258c24f5.tar.zst
nixlib-a31bf8961a3f0b2cfe28e0240698cd19258c24f5.zip
grub bootloader: add forceInstall option
Using the --force option on GRUB isn't recommended, but there are very
specific instances where it makes sense. One example is installing on a
partitionless disk.
Diffstat (limited to 'nixos/modules/system/boot/loader/grub/grub.nix')
-rw-r--r--nixos/modules/system/boot/loader/grub/grub.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index c3be7407d592..588e54a9d3a0 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -53,7 +53,7 @@ let
       inherit (args) devices;
       inherit (efi) canTouchEfiVariables;
       inherit (cfg)
-        version extraConfig extraPerEntryConfig extraEntries
+        version extraConfig extraPerEntryConfig extraEntries forceInstall 
         extraEntriesBeforeNixOS extraPrepareConfig configurationLimit copyKernels
         default fsIdentifier efiSupport efiInstallAsRemovable gfxmodeEfi gfxmodeBios;
       path = (makeBinPath ([
@@ -404,6 +404,16 @@ in
         '';
       };
 
+      forceInstall = mkOption {
+        default = false;
+        type = types.bool;
+        description = ''
+          Whether to try and forcibly install GRUB even if problems are
+          detected. It is not recommended to enable this unless you know what
+          you are doing.
+        '';
+      };
+
       trustedBoot = {
 
         enable = mkOption {