Fediversity/infra/common/proxmox-qemu-vm.nix
Kiara Grouwstra 815fc20017
bootable disk
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-10-22 15:27:26 +02:00

81 lines
1.5 KiB
Nix

{ lib, ... }:
{
_class = "nixos";
## FIXME: It would be nice, but the following leads to infinite recursion
## in the way we currently plug `sources` in.
##
# imports = [
# "${sources.nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
# ];
boot = {
loader = {
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
grub.enable = false;
};
initrd = {
availableKernelModules = [
"ata_piix"
"uhci_hcd"
"sd_mod"
"sr_mod"
];
kernelModules = [ "dm-snapshot" ];
};
};
fileSystems."/boot" = {
fsType = "vfat";
device = lib.mkDefault "/dev/sda1";
options = [
"fmask=0022"
"dmask=0022"
];
};
disko.devices.disk.main = {
device = "/dev/sda";
type = "disk";
imageSize = "20G"; # needed for image generation
content = {
type = "gpt";
partitions = {
# mbr = {
# priority = 0;
# size = "1M";
# type = "EF02";
# };
esp = {
priority = 1;
size = "500M";
type = "EF00";
label = "boot";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
priority = 2;
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
}