summaryrefslogtreecommitdiff
path: root/nixos/boot.nix
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2021-08-06 18:51:59 +0200
committerQuentin Aristote <quentin@aristote.fr>2021-08-06 18:51:59 +0200
commita1f7f43c95c049628e826856ec589b339cd4f5db (patch)
treea0f5bb10fc36f02ad6dbaebf1232ca2548f9ccfa /nixos/boot.nix
initial commit
Diffstat (limited to 'nixos/boot.nix')
-rw-r--r--nixos/boot.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/nixos/boot.nix b/nixos/boot.nix
new file mode 100644
index 0000000..8c7b28c
--- /dev/null
+++ b/nixos/boot.nix
@@ -0,0 +1,38 @@
+{ config, ... }:
+
+{
+ imports = [ # Include the results of the hardware scan.
+ ./hardware-configuration.nix
+ ];
+
+ boot.loader = {
+ systemd-boot.enable = true;
+ efi = { canTouchEfiVariables = true; };
+ grub = {
+ enable = true;
+ version = 2;
+ efiSupport = true;
+ enableCryptodisk = true;
+ device = "nodev";
+ # extraEntries =
+ # # Recovery mode
+ # # Generate the image with generate-recovery.sh
+ # ''
+ # menuentry "NixOS - Recovery" {
+ # search --set=drive1 -fs-uuid 330B-45DE
+ # linux ($drive1)//kernels/recovery-linux-bzImage loglevel=4
+ # initrd ($drive1)//kernels/recovery-initrd
+ # }
+ # '';
+ };
+ };
+
+ # Decrypt disk
+ boot.initrd.luks.devices = {
+ sda3_crypt = {
+ name = "sda3_crypt";
+ device = "/dev/disk/by-uuid/ba5dc9cd-3a73-4a01-880b-8720844307ae";
+ preLVM = true;
+ };
+ };
+}