From a1f7f43c95c049628e826856ec589b339cd4f5db Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Fri, 6 Aug 2021 18:51:59 +0200 Subject: initial commit --- nixos/boot.nix | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 nixos/boot.nix (limited to 'nixos/boot.nix') 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; + }; + }; +} -- cgit v1.2.3