Boot

Updated: September 28, 2024

Boot related things for Nix.

This involves issue that could be related to any machine.
Particularly, boot loader, efi, and systemd.



Table of Contents



Bootloader

# switch from systemd to grub
# may need to remove systemd from boot.
sudo bootctl remove

# create new generation, install grub as bootloader
sudo nixos-build boot --install-bootloader
# reboot with something like this in configuration.nix
  boot.loader = {
    systemd-boot.enable = false;
    efi = {
      canTouchEfiVariables = true;
      efiSysMountPoint = "/boot";
    };
    timeout = 30;
    grub = {
      enable = true;
      device = "/dev/sda";
      useOSProber = true;

      darkmatter-theme = {
        enable = true;
        style = "nixos";
        icon = "color";
        resolution = "1440p";
      };
    };
  };