From 9721eac50628d1b6381b2e3da0dfde97ff578a39 Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 14 Mar 2024 00:29:36 -0700 Subject: [PATCH] make it run --- hosts/malachite/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hosts/malachite/default.nix b/hosts/malachite/default.nix index 308cf19..3d3d3df 100644 --- a/hosts/malachite/default.nix +++ b/hosts/malachite/default.nix @@ -1,7 +1,7 @@ -{ config, pkgs, ... } +{ config, pkgs, ... }: let - passthrough = pkgs.writeShellScript "pasthrough.sh" '' - #/usr/bin/env bash + passthrough = pkgs.writeShellScript "passthrough.sh" '' + #!/usr/bin/env bash GUEST_NAME="$1" HOOK_NAME="$2" @@ -11,10 +11,10 @@ let set -x # For the windows 10 VM - if[$GUEST_NAME == 'win10']; then + if [[ "$GUEST_NAME" == "win10" ]]; then # Prepare hook - if["$HOOK_NAME/$STATE_NAME" == "prepare/begin"]; then + if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then # Remove Hyprland pkill Hyprland @@ -36,7 +36,7 @@ let # Load VFIO Kernel Module 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) virsh nodedev-reattach pci_0000_01_00_0 @@ -67,7 +67,7 @@ in { [ ./hardware-configuration.nix ]; - virtualization.libvirtd.hooks.qemu = { + virtualisation.libvirtd.hooks.qemu = { passthrough = "${passthrough}"; }; @@ -80,4 +80,4 @@ in { # Read the Docs before Changing system.stateVersion = "23.05"; # Did you read the comment? -}; +}