43 lines
961 B
Nix
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;
|
|
}
|