summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/efi.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-10 13:28:20 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-10 13:28:20 +0200
commit5c1f8cbc70cd5e6867ef6a2a06d27a40daa07010 (patch)
treea6c0f605be6de3f372ae69905b331f9f75452da7 /nixos/modules/system/boot/loader/efi.nix
parent6070bc016bd2fd945b04347e25cfd3738622d2ac (diff)
downloadnixpkgs-5c1f8cbc70cd5e6867ef6a2a06d27a40daa07010.tar
nixpkgs-5c1f8cbc70cd5e6867ef6a2a06d27a40daa07010.tar.gz
nixpkgs-5c1f8cbc70cd5e6867ef6a2a06d27a40daa07010.tar.bz2
nixpkgs-5c1f8cbc70cd5e6867ef6a2a06d27a40daa07010.tar.lz
nixpkgs-5c1f8cbc70cd5e6867ef6a2a06d27a40daa07010.tar.xz
nixpkgs-5c1f8cbc70cd5e6867ef6a2a06d27a40daa07010.tar.zst
nixpkgs-5c1f8cbc70cd5e6867ef6a2a06d27a40daa07010.zip
Move all of NixOS to nixos/ in preparation of the repository merge
Diffstat (limited to 'nixos/modules/system/boot/loader/efi.nix')
-rw-r--r--nixos/modules/system/boot/loader/efi.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/loader/efi.nix b/nixos/modules/system/boot/loader/efi.nix
new file mode 100644
index 00000000000..827b3e39122
--- /dev/null
+++ b/nixos/modules/system/boot/loader/efi.nix
@@ -0,0 +1,49 @@
+{ pkgs, ... }:
+
+with pkgs.lib;
+
+{
+  options.boot.loader.efi = {
+    canTouchEfiVariables = mkOption {
+      default = false;
+
+      type = types.bool;
+
+      description = "Whether or not the installation process should modify efi boot variables.";
+    };
+
+    efibootmgr = {
+      efiDisk = mkOption {
+        default = "/dev/sda";
+
+        type = types.string;
+
+        description = "The disk that contains the EFI system partition.";
+      };
+
+      efiPartition = mkOption {
+        default = "1";
+        description = "The partition number of the EFI system partition.";
+      };
+
+      postEfiBootMgrCommands = mkOption {
+        default = "";
+        type = types.string;
+        description = ''
+          Shell commands to be executed immediately after efibootmgr has setup the system EFI.
+          Some systems do not follow the EFI specifications properly and insert extra entries.
+          Others will brick (fix by removing battery) on boot when it finds more than X entries.
+          This hook allows for running a few extra efibootmgr commands to combat these issues.
+        '';
+      };
+    };
+
+    efiSysMountPoint = mkOption {
+      default = "/boot";
+
+      type = types.string;
+
+      description = "Where the EFI System Partition is mounted.";
+    };
+  };
+}