2022-03-10 12:25:23 +00:00
|
|
|
{ config, pkgs, ... }: {
|
2021-06-02 20:42:32 +01:00
|
|
|
|
|
|
|
boot = {
|
2022-03-10 12:25:23 +00:00
|
|
|
initrd.availableKernelModules = [
|
|
|
|
"ata_piix"
|
|
|
|
"uhci_hcd"
|
|
|
|
"virtio_pci"
|
|
|
|
"sr_mod"
|
|
|
|
"virtio_blk"
|
|
|
|
"virtio_net"
|
|
|
|
"virtio_pci"
|
|
|
|
"virtio_mmio"
|
|
|
|
"virtio_blk"
|
|
|
|
"virtio_scsi"
|
|
|
|
"9p"
|
|
|
|
"9pnet_virtio"
|
|
|
|
];
|
2021-06-02 20:42:32 +01:00
|
|
|
initrd.kernelModules = [ "virtio_balloon" "virtio_console" "virtio_rng" ];
|
|
|
|
|
|
|
|
initrd.postDeviceCommands = ''
|
|
|
|
# Set the system time from the hardware clock to work around a
|
|
|
|
# bug in qemu-kvm > 1.5.2 (where the VM clock is initialised
|
|
|
|
# to the *boot time* of the host).
|
|
|
|
hwclock -s
|
|
|
|
'';
|
|
|
|
|
2021-10-01 16:11:52 +01:00
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
2021-06-02 20:42:32 +01:00
|
|
|
loader.grub.enable = true;
|
|
|
|
loader.grub.version = 2;
|
|
|
|
loader.grub.device = "/dev/vda";
|
2021-10-01 16:11:52 +01:00
|
|
|
};
|
2021-06-02 20:42:32 +01:00
|
|
|
|
2021-10-01 16:11:52 +01:00
|
|
|
fileSystems."/" = {
|
|
|
|
device = "/dev/disk/by-uuid/d37c4c81-4807-4b8b-bcd4-05ae76bccbaa";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
2021-06-02 20:42:32 +01:00
|
|
|
|
2022-03-10 12:25:23 +00:00
|
|
|
swapDevices = [{
|
|
|
|
device = "/swapfile";
|
|
|
|
size = 2048;
|
|
|
|
}];
|
2021-06-02 20:42:32 +01:00
|
|
|
|
2021-10-01 16:11:52 +01:00
|
|
|
}
|
2021-06-02 20:42:32 +01:00
|
|
|
|