virtualization plus wifif

This commit is contained in:
stitchy 2024-06-05 05:46:08 -07:00
parent b27b33d13e
commit fa48674845
Signed by: stitchy
SSH key fingerprint: SHA256:p+xeQgmOvQ2br1d2STl5OnRRMef2LRqCtGA7SO4WYk0
2 changed files with 9 additions and 7 deletions

View file

@ -1,15 +1,13 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
passthrough = pkgs.writeShellApplication { passthrough = pkgs.writeShellApplication {
name = "pasthrough.sh"; name = "passthrough.sh";
runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirt" "procps" ] pkgs; runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirt" "procps" ] pkgs;
text = '' text = ''
GUEST_NAME="$1" GUEST_NAME="$1"
HOOK_NAME="$2" HOOK_NAME="$2"
STATE_NAME="$3" STATE_NAME="$3"
echo 19>/home/stitchynyan/startlogfile
BASH_XTRACEFD=19
set -x set -x
# For the windows 10 VM # For the windows 10 VM
@ -19,7 +17,7 @@ let
if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then
# Remove Hyprland # Remove Hyprland
pkill Hyprland #pkill Hyprland
# Unbind VTconsoles # Unbind VTconsoles
echo 0 > /sys/class/vtconsole/vtcon0/bind echo 0 > /sys/class/vtconsole/vtcon0/bind
@ -77,15 +75,19 @@ in {
../default.nix ../default.nix
]; ];
virtualisation.libvirtd.hooks.qemu = { virtualisation.libvirtd.hooks.qemu = {
passthrough = "${passthrough}"; passthrough = "${passthrough}/bin/passthrough.sh";
}; };
stitchyconf = { stitchyconf = {
artPkgs.enable = true; artPkgs.enable = true;
}; };
virtualisation.libvirtd.enable = true; virtualisation.libvirtd = {
enable = true;
onBoot = "ignore";
};
hardware = { hardware = {
opentabletdriver.enable = true;
steam-hardware.enable = true; steam-hardware.enable = true;
}; };

View file

@ -8,7 +8,7 @@
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "vfio-pci" ]; boot.kernelModules = [ "kvm-intel" "vfio-pci" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = lib.attrVals [ "rtl8812au" ] config.boot.kernelPackages;
boot.kernelParams = [ boot.kernelParams = [
"loglevel=3" "loglevel=3"