nixos-hypervisor/hosts/nixmox-perseverance/hardware-configuration.nix
2024-09-17 18:08:32 +02:00

54 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;
}