Add settings for QEMU vm

This commit is contained in:
Manuel Thalmann 2023-12-01 15:15:40 +01:00
parent 53e2d61c8d
commit ddfbd3b8d2
3 changed files with 32 additions and 1 deletions

View file

@ -11,6 +11,6 @@
inherit nixpkgs;
};
in {
nixosConfigurations.manu-surface = system "manu-surface" {};
nixosConfigurations.nixos = system "nixos" {};
};
}

26
lib/hardware/qemu.nix Normal file
View file

@ -0,0 +1,26 @@
{ config, lib, pkgs, modulesPath, ... }: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot = {
initrd = {
availableKernelModules = [
"ahci"
"xhci_pci"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
kernelModules = [];
};
kernelModules = [
"kvm-intel"
];
extraModulePackages = [];
};
}

5
lib/machines/nixos.nix Normal file
View file

@ -0,0 +1,5 @@
{ nixpkgs, ... }: {
imports = [
../hardware/qemu.nix
];
}