diff --git a/hosts/malachite/default.nix b/hosts/malachite/default.nix index 3beb2e4..ecf6ae2 100644 --- a/hosts/malachite/default.nix +++ b/hosts/malachite/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... } +{ config, pkgs, ... }: let passthrough = pkgs.writeShellScript "pasthrough.sh" '' GUEST_NAME="$1" @@ -9,10 +9,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 ${pkgs.busybox}/bin/pkill Hyprland @@ -34,7 +34,7 @@ let # Load VFIO Kernel Module ${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) ${pkgs.libvirt}/bin/virsh nodedev-reattach pci_0000_01_00_0 @@ -65,7 +65,7 @@ in { [ ./hardware-configuration.nix ]; - virtualization.libvirtd.hooks.qemu = { + virtualisation.libvirtd.hooks.qemu = { passthrough = "${passthrough}"; }; @@ -78,4 +78,4 @@ in { # Read the Docs before Changing system.stateVersion = "23.05"; # Did you read the comment? -}; +}