got virtual machines working besides audio

This commit is contained in:
gerg 2022-07-13 01:12:58 -04:00 committed by ISnortPennies
parent 50fae0b2eb
commit e06def29b8
4 changed files with 19 additions and 15 deletions

View file

@ -10,6 +10,11 @@
"xsetroot -cursor_name left_ptr"
"xsetroot -solid \"#000000\""
"flashfocus"
"bspc monitor -a I"
"bspc monitor -a II"
"bspc monitor -a III"
"bspc monitor -a IV"
"bspc monitor -a X"
];
settings = {
border_width = 0;
@ -22,8 +27,5 @@
borderless_monocle = true;
gapless_monocle = true;
};
monitors = {
eDP-1 = [ "I" "II" "III" "IV" "V" ];
};
};
}

View file

@ -27,7 +27,7 @@
</cputune>
<os>
<type arch="x86_64" machine="pc-q35-6.2">hvm</type>
<loader readonly="yes" type="pflash">/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader>
<loader readonly="yes" type="pflash">/run/libvirt/nix-ovmf/OVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/Main_VM_VARS.fd</nvram>
<boot dev="hd"/>
<bootmenu enable="yes"/>
@ -72,7 +72,7 @@
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<emulator>/run/libvirt/nix-emulators/qemu-system-x86_64</emulator>
<disk type="block" device="disk">
<driver name="qemu" type="raw" cache="none" io="native" discard="unmap"/>
<source dev="/dev/disk/by-id/ata-Samsung_SSD_870_EVO_500GB_S6PXNM0T402828A"/>
@ -164,7 +164,7 @@
</controller>
<interface type="bridge">
<mac address="52:54:00:05:03:2d"/>
<source bridge="bridge0"/>
<source bridge="virbr0"/>
<model type="virtio"/>
<link state="up"/>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>

View file

@ -1,7 +1,8 @@
{ pkgs, ... }:
{
boot = {
kernelParams = [ "amd_iommu=on" ];
boot.kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
initrd.kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
extraModprobeConfig = "options vfio-pci ids=10de:228e,10de:2504";
};
@ -9,11 +10,12 @@
libvirtd = {
enable = true;
qemu = {
runAsRoot = false;
ovmf = {
enable = true;
package = pkgs.OVMFFull;
};
runAsRoot = true;
ovmf.enable = true;
# verbatimConfig = ''
# user = gerg
# namespaces = []
# '';
};
};
};

View file

@ -11,6 +11,7 @@
../modules/scripts.nix
../modules/misc.nix
../modules/vfio.nix
../modules/xserver.nix
];
networking.hostName = "gerg-desktop";
nix = {
@ -19,7 +20,6 @@
experimental-features = nix-command flakes
'';
};
services.xserver = import ../modules/xserver.nix;
system.stateVersion = "22.11";
hardware.cpu.amd.updateMicrocode = true;
# end important stuff
@ -29,7 +29,7 @@
defaultUserShell = pkgs.zsh;
users.gerg = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" "networkmanager" "libvirt" ];
extraGroups = [ "wheel" "audio" "networkmanager" "kvm" "libvirtd" ];
};
};
}