Compare commits

..

No commits in common. "a40307cadfe58e4d521d1b0db723a17ca01c649e" and "65c55370ded4874043b93b87ada8f32fd4725024" have entirely different histories.

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }
let let
passthrough = pkgs.writeShellScript "pasthrough.sh" '' passthrough = pkgs.writeShellScript "pasthrough.sh" ''
GUEST_NAME="$1" GUEST_NAME="$1"
@ -9,10 +9,10 @@ let
set -x set -x
# For the windows 10 VM # For the windows 10 VM
if [[ "$GUEST_NAME" == "win10" ]]; then if[$GUEST_NAME == 'win10']; then
# Prepare hook # Prepare hook
if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then if["$HOOK_NAME/$STATE_NAME" == "prepare/begin"]; then
# Remove Hyprland # Remove Hyprland
${pkgs.busybox}/bin/pkill Hyprland ${pkgs.busybox}/bin/pkill Hyprland
@ -34,7 +34,7 @@ let
# Load VFIO Kernel Module # Load VFIO Kernel Module
${pkgs.busybox}/bin/modprobe vfio_pci ${pkgs.busybox}/bin/modprobe vfio_pci
elif [[ "$HOOK_NAME/$STATE_NAME" == "release/end" ]]; then elif["$HOOK_NAME/$STATE_NAME" == "release/end"]; then
# Re-Bind GPU to Nvidia Driver (replace the pci addresses with yours) # Re-Bind GPU to Nvidia Driver (replace the pci addresses with yours)
${pkgs.libvirt}/bin/virsh nodedev-reattach pci_0000_01_00_0 ${pkgs.libvirt}/bin/virsh nodedev-reattach pci_0000_01_00_0
@ -65,7 +65,7 @@ in {
[ [
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
virtualisation.libvirtd.hooks.qemu = { virtualization.libvirtd.hooks.qemu = {
passthrough = "${passthrough}"; passthrough = "${passthrough}";
}; };
@ -78,4 +78,4 @@ in {
# Read the Docs before Changing # Read the Docs before Changing
system.stateVersion = "23.05"; # Did you read the comment? system.stateVersion = "23.05"; # Did you read the comment?
} };