homelab/profiles/proxmox-vm.nix
plasmagoat bcbcc8b17b
Some checks failed
Test / tests (push) Has been cancelled
/ OpenTofu (push) Has been cancelled
homelab framework module init (everything is a mess)
2025-07-28 02:05:13 +02:00

43 lines
961 B
Nix

# profiles/proxmox-vm.nix - Proxmox VM specific profile
{
config,
lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
# Proxmox VM specific configuration
services.qemuGuest.enable = true;
# Boot configuration for Proxmox VMs
boot = {
loader.grub = {
enable = true;
devices = ["nodev"];
};
growPartition = true;
tmp.cleanOnBoot = true;
# Proxmox specific kernel modules
initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"];
};
# Standard Proxmox VM filesystem
fileSystems."/" = lib.mkDefault {
device = "/dev/disk/by-label/nixos";
autoResize = true;
fsType = "ext4";
};
# Update global config with Proxmox-specific info
homelab = {
location = lib.mkDefault "proxmox-cluster";
tags = lib.mkDefault ["proxmox-vm" "homelab"];
};
# VM-specific optimizations
services.fstrim.enable = true;
}