{ imports = [ ./hardware-configuration.nix ]; boot.loader.grub.enable = true; boot.loader.grub.version = 2; # Define on which hard drive you want to install Grub. boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only # Minimal list of modules to use the EFI system partition and the YubiKey boot.initrd.kernelModules = [ "vfat" "nls_cp437" "nls_iso8859-1" "usbhid" ]; # Enable support for the YubiKey PBA boot.initrd.luks.yubikeySupport = true; # Configuration to use your Luks device boot.initrd.luks.devices = { "crypthome" = { device = "/dev/sda2"; preLVM = true; # You may want to set this to false if you need to start a network service first yubikey = { slot = 2; twoFactor = true; # Set to false if you did not set up a user password. storage = { device = "/dev/sda1"; }; }; }; }; }