Refactor.
This commit is contained in:
parent
69088478f0
commit
667f337363
14 changed files with 173 additions and 164 deletions
35
suites/vm.nix
Normal file
35
suites/vm.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
modulesPath,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
./server.nix
|
||||
];
|
||||
|
||||
# Load kernel modules.
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
];
|
||||
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
|
||||
# Enable DHCP.
|
||||
networking.useDHCP = mkDefault true;
|
||||
|
||||
# Configure the bootloader.
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
};
|
||||
|
||||
# Enable QEMU guest agent
|
||||
services.qemuGuest.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue