Refactor the Nix config management.
This commit is contained in:
parent
55fe63bcdb
commit
aca053b4e1
23 changed files with 954 additions and 1764 deletions
29
nix-system-configs/modules/bootloader/seabios.nix
Normal file
29
nix-system-configs/modules/bootloader/seabios.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# SeaBIOS / legacy BIOS bootloader settings for VMs
|
||||
boot.loader.grub.enable = lib.mkForce true;
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
boot.loader.grub.efiSupport = lib.mkForce false;
|
||||
|
||||
# Bootloader - GRUB for Legacy BIOS
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/vda"; # Install GRUB to the disk
|
||||
efiSupport = false; # Disable UEFI
|
||||
};
|
||||
boot.initrd.availableKernelModules = ["virtio_pci" "virtio_scsi" "ahci" "sd_mod" "virtio_blk"];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/vda1";
|
||||
fsType = "ext4"; # Use "btrfs" or "xfs" if you formatted it differently
|
||||
};
|
||||
|
||||
virtualisation.qemu.enable = true;
|
||||
|
||||
myBoot.seabiosPackages = with pkgs; [];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue