reworked sxhkd, added QMK stuff, fixed VM

This commit is contained in:
Gerg-L 2023-11-05 00:58:49 -04:00
parent 928040c5cf
commit 56c9d32f85
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI
5 changed files with 95 additions and 91 deletions

View file

@ -177,10 +177,19 @@
<source dev='/dev/input/by-id/usb-Logitech_G502_HERO_Gaming_Mouse_1974396F3638-event-mouse'/>
</input>
<input type='evdev'>
<source dev='/dev/input/by-id/usb-Logitech_Gaming_Keyboard_G610_067A397A3637-event-kbd' grab='all' repeat='on'/>
<source dev='/dev/input/by-id/usb-Logitech_G502_HERO_Gaming_Mouse_1974396F3638-if01-event-kbd'/>
</input>
<input type='evdev'>
<source dev='/dev/input/by-id/usb-Logitech_G502_HERO_Gaming_Mouse_1974396F3638-if01-event-kbd'/>
<source dev='/dev/input/by-id/usb-Keychron_Keychron_V6-event-kbd' grab='all' repeat='on'/>
</input>
<input type='evdev'>
<source dev='/dev/input/by-id/usb-Keychron_Keychron_V6-event-if02'/>
</input>
<input type='evdev'>
<source dev='/dev/input/by-id/usb-Keychron_Keychron_V6-if02-event-kbd'/>
</input>
<input type='evdev'>
<source dev='/dev/input/by-id/usb-Keychron_Keychron_V6-if02-event-mouse'/>
</input>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
@ -208,8 +217,6 @@
<qemu:arg value='-device'/>
<qemu:arg value='hda-duplex,audiodev=audio0'/>
<qemu:env name='PIPEWIRE_RUNTIME_DIR' value='/run/user/1000'/>
<qemu:env name='PIPEWIRE_LATENCY' value='512/48000'/>
<qemu:env name='LD_LIBRARY_PATH' value='$LD_LIBRARY_PATH:/run/current-system/sw/lib/pipewire'/>
</qemu:commandline>
</domain>

View file

@ -3,9 +3,6 @@
{
local = {
remoteBuild.isBuilder = true;
X11Programs = {
sxhkd.enable = true;
};
DE.dwm.enable = true;
DM = {
lightdm.enable = true;
@ -73,6 +70,9 @@
nix-index
element-desktop
webcord
# QMK configuration
via
qmk
;
inherit (nvim-flake.packages) neovim;
inherit fmt;
@ -103,7 +103,11 @@
};
};
services.udev.packages = [ pkgs.android-udev-rules ];
services.udev.packages = [
pkgs.android-udev-rules
pkgs.via
pkgs.qmk-udev-rules
];
programs.adb.enable = true;
networking = {

View file

@ -145,11 +145,9 @@ in
'';
systemd.tmpfiles.settings."vfio" = {
"/etc/Xorg/active.conf"."L".argument = "/etc/Xorg/2_mon.conf";
"/var/lib/libvirt/qemu/Windows.xml"."L+".argument = toString ./Windows.xml;
"/var/lib/libvirt/hooks/qemu"."L+".argument = lib.getExe (
pkgs.writeShellApplication {
systemd.tmpfiles.rules =
let
qemuHook = pkgs.writeShellApplication {
name = "qemu-hook";
runtimeInputs = [
@ -157,11 +155,12 @@ in
pkgs.systemd
pkgs.kmod
];
text = ''
GUEST_NAME="$1"
OPERATION="$2"
if [ "$GUEST_NAME" == "Windows" ]; then
if [ "$GUEST_NAME" != "Windows" ]; then
exit 0
fi
@ -190,9 +189,14 @@ in
rm /etc/Xorg/ONE_MONITOR
systemctl start display-manager.service
fi
'';
}
);
};
};
in
[
"L /etc/Xorg/active.conf - - - - /etc/Xorg/2_mon.conf"
"L+ /var/lib/libvirt/hooks/qemu - - - - ${lib.getExe qemuHook}"
"L+ /var/lib/libvirt/qemu/Windows.xml - - - - ${./Windows.xml}"
];
_file = ./vfio.nix;
}