nixos-hypervisor/hosts/nixmox-perseverance/hardware-configuration.nix

55 lines
1.2 KiB
Nix
Raw Normal View History

2024-09-10 10:46:49 +02:00
{ lib, system, ... }:
2024-09-09 10:48:56 +02:00
{
2024-09-10 10:46:49 +02:00
boot = {
# use latest kernel
# kernelPackages = pkgs.linuxPackages_latest;
supportedFilesystems = [ "ext4" "btrfs" "xfs" "fat" "vfat" "cifs" "nfs" ];
growPartition = true;
kernelModules = [ "kvm-intel" ];
kernelParams = lib.mkForce [ ];
2024-09-09 10:48:56 +02:00
2024-09-10 10:46:49 +02:00
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" ];
};
2024-09-09 10:48:56 +02:00
2024-09-10 10:46:49 +02:00
tmp.cleanOnBoot = true;
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
autoResize = true;
2024-09-09 10:48:56 +02:00
fsType = "ext4";
};
2024-09-10 10:46:49 +02:00
"/boot" = {
device = "/dev/disk/by-label/ESP";
fsType = "vfat";
};
2024-09-17 18:08:32 +02:00
2024-09-13 11:48:15 +02:00
"/var/lib/microvms" = {
device = "/dev/vdb1";
fsType = "ext4";
};
2024-09-10 10:46:49 +02:00
};
2024-09-09 10:48:56 +02:00
2024-09-10 10:46:49 +02:00
services.fstrim = {
enable = true;
interval = "weekly";
};
2024-09-09 10:48:56 +02:00
2024-09-10 10:46:49 +02:00
nixpkgs.hostPlatform = lib.mkDefault system;
2024-09-09 10:48:56 +02:00
}