# A Proxmox VM BIOS boot configuration.
# Sources for this configuration:
# - a generated NixOS 23.05 configuration
# - https://github.com/NixOS/nixpkgs/blob/069de7d3deafab651fd627c8f6d7e4c7b33087a2/nixos/modules/virtualisation/proxmox-image.nix#L241
# - https://nixos.org/manual/nixos/stable/#sec-installation-manual-installing

{ config, pkgs, lib, ... }:

{
  boot = {
    initrd.availableKernelModules = [ "uas" "virtio_blk" "virtio_pci" ];
    initrd.kernelModules = [ ];
    # Not specified here:
    # - boot.kernelModules
    # - boot.extraModulePackages
    # Please specify as needed elsewhere.

    # Grow the root partition on boot.
    growPartition = true;

    kernelParams = [ "console=ttyS0" ];

    loader.systemd-boot = {
      enable = true;
      editor = false;
    };

    loader.efi.efiSysMountPoint = "/boot";

    loader.timeout = lib.mkForce 2;
  };
}