29 lines
646 B
Nix
29 lines
646 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [ ];
|
|
|
|
boot.loader.grub.enable = false;
|
|
# Use the systemd-boot EFI boot loader.
|
|
boot.loader.systemd-boot.enable = true;
|
|
# TODO: make not write bootx64.efi
|
|
boot.loader.efi.canTouchEfiVariables = false;
|
|
|
|
# Automatically delete old generations
|
|
boot.loader.systemd-boot.configurationLimit = 3;
|
|
}
|
|
|
|
# efibootmgr -c -d /dev/sda -p 1 -L NixOS-boot -l '\EFI\NixOS-boot\grubx64.efi'
|
|
|
|
# Text-only:
|
|
# sudo cp "$(nix-build '<nixpkgs>' --no-out-link -A 'refind')/share/refind/refind_x64.efi" /boot/EFI/boot/bootx64.efi
|
|
|
|
# Full graphics:
|
|
# $ sudo nix-shell -p refind efibootmgr
|
|
# $ refind-install
|