2024-09-17 14:48:19 +02:00
|
|
|
{ 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";
|
|
|
|
};
|
2024-09-17 18:32:10 +02:00
|
|
|
|
|
|
|
"/var/lib/microvms" = {
|
|
|
|
device = "/dev/vdb1";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
2024-09-17 14:48:19 +02:00
|
|
|
};
|
|
|
|
|
2024-09-17 18:32:10 +02:00
|
|
|
|
2024-09-17 14:48:19 +02:00
|
|
|
services.fstrim = {
|
|
|
|
enable = true;
|
|
|
|
interval = "weekly";
|
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault system;
|
|
|
|
}
|