Switch from BIOS and GRUB to UEFI and systemd-boot for Proxmox VMs
This commit is contained in:
parent
5bfa655d3e
commit
c427ff934a
3 changed files with 17 additions and 8 deletions
|
@ -2,8 +2,9 @@
|
|||
# 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, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
boot = {
|
||||
|
@ -12,19 +13,20 @@
|
|||
# Not specified here:
|
||||
# - boot.kernelModules
|
||||
# - boot.extraModulePackages
|
||||
# Please specify as needed.
|
||||
|
||||
# Please specify as needed elsewhere.
|
||||
|
||||
# Grow the root partition on boot.
|
||||
growPartition = true;
|
||||
|
||||
kernelParams = [ "console=ttyS0" ];
|
||||
|
||||
loader.grub = {
|
||||
loader.systemd-boot = {
|
||||
enable = true;
|
||||
# TODO: Can we use "/dev/disk/by-label/nixos" here?
|
||||
device = "/dev/vda";
|
||||
editor = false;
|
||||
};
|
||||
|
||||
loader.timeout = 0;
|
||||
loader.efi.efiSysMountPoint = "/boot";
|
||||
|
||||
loader.timeout = lib.mkForce 2;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -12,6 +12,11 @@
|
|||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/ESP";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
# Not specified here:
|
||||
# - swapDevices
|
||||
# If needed, manually specify it elsewhere.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue