NixOS/system/grub.nix

35 lines
934 B
Nix
Raw Normal View History

2023-11-17 11:34:15 +00:00
{ pkgs, ... }:
{
# ======================================================
# ____ _ _ _
# | __ ) ___ ___ | |_| | ___ __ _ __| | ___ _ __
# | _ \ / _ \ / _ \| __| |/ _ \ / _` |/ _` |/ _ \ '__|
# | |_) | (_) | (_) | |_| | (_) | (_| | (_| | __/ |
# |____/ \___/ \___/ \__|_|\___/ \__,_|\__,_|\___|_|
#
# Bootloader
# UEFI enabled GRUB2 setup
# with full disk encryption and swap with hibernation
# Bootloader
boot.loader = {
efi = {
canTouchEfiVariables = false;
efiSysMountPoint = "/boot";
};
grub = {
enable = true;
efiSupport = true;
extraEntriesBeforeNixOS = true;
efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work for your system
device = "nodev";
useOSProber = true;
};
};
# Setup keyfile
boot.initrd.secrets = {
"/crypto_keyfile.bin" = null;
};
2023-11-18 10:33:43 +00:00
}