Merge branch 'master' of gay.stitchy.moe:stitchy/dotfiles

This commit is contained in:
stitchy 2024-03-15 22:22:58 +00:00
commit 16fb30026c
Signed by: stitchy
SSH key fingerprint: SHA256:yz2SoxdnY67tfY5Jzb0f2v8f5W3o/IF359kbcquWip8

View file

@ -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?
};
}