nixos-hypervisor/hosts/nixmox-curiosity/hardware-configuration.nix
Théo Barnouin 781ce2d5e9
All checks were successful
/ Build Nix targets (push) Successful in 3m36s
Format using alejandra
2025-01-23 14:13:19 +01:00

56 lines
1.2 KiB
Nix

{
lib,
system,
...
}: {
boot = {
# use latest kernel
# kernelPackages = pkgs.linuxPackages_latest;
supportedFilesystems = ["ext4" "btrfs" "xfs" "fat" "vfat" "cifs" "nfs"];
growPartition = true;
kernelModules = ["kvm-intel"];
kernelParams = lib.mkForce [];
loader = {
grub = {
enable = true;
device = "nodev";
efiSupport = true;
efiInstallAsRemovable = true;
};
timeout = lib.mkForce 3;
};
initrd = {
availableKernelModules = ["9p" "9pnet_virtio" "ata_piix" "uhci_hcd" "virtio_blk" "virtio_mmio" "virtio_net" "virtio_pci" "virtio_scsi"];
kernelModules = ["virtio_balloon" "virtio_console" "virtio_rng"];
};
tmp.cleanOnBoot = true;
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
autoResize = true;
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/ESP";
fsType = "vfat";
};
"/var/lib/microvms" = {
device = "/dev/vdb1";
fsType = "ext4";
};
};
services.fstrim = {
enable = true;
interval = "weekly";
};
nixpkgs.hostPlatform = lib.mkDefault system;
}