mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Depot cannot be stopped and neither can I
This commit is contained in:
parent
1f613c6fb7
commit
01460123a6
256 changed files with 15 additions and 15 deletions
|
|
@ -1,60 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
deploy.profile.vfio = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
screenstub
|
||||
kat-vm
|
||||
ddcutil
|
||||
];
|
||||
|
||||
|
||||
users.users.kat.extraGroups = [ "vfio" "input" "uinput" ];
|
||||
users.groups = { uinput = { }; vfio = { }; };
|
||||
|
||||
boot = lib.mkMerge [ {
|
||||
initrd.kernelModules = mkBefore ["vfio" "vfio_iommu_type1" "vfio_pci" "vfio_virqfd"];
|
||||
kernelModules = [ "i2c-dev" ]; # i2c-dev is required for DDC/CI for screenstub
|
||||
kernelPatches = with pkgs.kernelPatches; [
|
||||
(mkIf config.deploy.profile.hardware.acs-override acs-override)
|
||||
];
|
||||
} (mkIf (config.deploy.profile.hardware.amdgpu) {
|
||||
kernelParams = [
|
||||
"video=efifb:off"
|
||||
];
|
||||
extraModulePackages = [
|
||||
(pkgs.linuxPackagesFor config.boot.kernelPackages.kernel).vendor-reset
|
||||
];
|
||||
}) ( mkIf (config.deploy.profile.hardware.acs-override) {
|
||||
kernelParams = [
|
||||
"pci=noats"
|
||||
"pcie_acs_override=downstream,multifunction"
|
||||
];
|
||||
}) ];
|
||||
|
||||
environment.etc."qemu/bridge.conf".text = "allow br";
|
||||
|
||||
security.wrappers = {
|
||||
qemu-bridge-helper = {
|
||||
source = "${pkgs.qemu-vfio}/libexec/qemu-bridge-helper";
|
||||
};
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="i2c-dev", GROUP="vfio", MODE="0660"
|
||||
SUBSYSTEM=="misc", KERNEL=="uinput", OPTIONS+="static_node=uinput", MODE="0660", GROUP="uinput"
|
||||
SUBSYSTEM=="vfio", OWNER="root", GROUP="vfio"
|
||||
'';
|
||||
|
||||
security.pam.loginLimits = [{
|
||||
domain = "@vfio";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}];
|
||||
|
||||
systemd.extraConfig = "DefaultLimitMEMLOCK=infinity";
|
||||
}
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
screens:
|
||||
- monitor: # fill in with info from `screenstub detect`
|
||||
manufacturer: BNQ
|
||||
model: BenQ GW2270
|
||||
#serial: "..."
|
||||
guest_source: # Could be automatically detected, but best to fill in if monitor has more than two inputs
|
||||
name: HDMI-1
|
||||
#value: 0x0f # can also specify raw VCP value
|
||||
host_source: # Usually automatically detected
|
||||
name: HDMI-2
|
||||
#value: 0x11
|
||||
ddc:
|
||||
#minimal_delay: 100ms # minimum time to wait between switching inputs again
|
||||
#guest: [] # disable input switching
|
||||
#host: [] # disable input switching
|
||||
guest: # configure how to switch to the guest
|
||||
#- guest_wait # wait until guest agent responds, otherwise might get stranded on other input
|
||||
- ddc # (default) Use ddc-rs
|
||||
#exec: ["ddcutil", "-g", "BNQ", "setvcp", "0x60", "{}"]
|
||||
#- exec: [ddccontrol, -r, "0x60", -w, "{}", /dev/i2c-5]
|
||||
host: # configure how to switch back from the guest
|
||||
- ddc # (default) Controls DDC from the host GPU - requires no guest agent but many monitors won't support this
|
||||
#- exec: ["ddcutil", "-g", "BNQ", "setvcp", "0x60", "{}"]
|
||||
#- guest_exec: ["C:/ddcset.exe", "setvcp", "60", "{:x}"] # or "0x{:x}" for hex input value
|
||||
#- guest_exec: ["C:/ScreenBright.exe", "-set", "0x60", "{}"] # "{}" is for decimal input value
|
||||
#- exec: ["ssh", "user@vm", "ddcutil", "setvcp", "0x60", "{}"] # system commands can also be used
|
||||
|
||||
qemu:
|
||||
#routing: qmp # (default) does not require extra configuration or dependencies
|
||||
#routing: spice # no external requirements # CURRENTLY UNIMPLEMENTED
|
||||
#routing: input-linux # requires uinput
|
||||
routing: virtio-host # requires uinput, recommended for performance, requires vioinput drivers in guest
|
||||
#driver: ps2 # use PS/2 in the guest for all input devices (absolute mouse mode unsupported)
|
||||
#driver: usb # use USB keyboard/mouse/tablet in the guest
|
||||
#driver: virtio # Recommended but vioinput drivers must be installed in guest
|
||||
#keyboard_driver: ps2 # (default) can also be set separately per input type, this should rarely be necessary
|
||||
#relative_driver: usb # (default)
|
||||
#absolute_driver: usb # (default)
|
||||
#driver: virtio
|
||||
#relative_driver: virtio
|
||||
qmp_socket: /tmp/vfio-qmp # path to QMP socket
|
||||
ga_socket: /tmp/vfio-qga # path to Guest Agent socket
|
||||
|
||||
key_remap: # Arbitrary keys can be remapped in the guest
|
||||
# See https://docs.rs/input-linux/*/input_linux/enum.Key.html for a list of key names available (mouse buttons can also be used)
|
||||
LeftMeta: Reserved # disable the windows key
|
||||
RightAlt: LeftMeta # remap right alt to trigger the windows key
|
||||
|
||||
hotkeys: # Trigger various events on key combinations
|
||||
#- toggle_grab:y
|
||||
# xdevice: # CURRENTLY UNIMPLEMENTED
|
||||
# devices: # Only grab specific devices from Xorg
|
||||
# - "..."
|
||||
#- exec: [echo, hi] # Execute an arbitrary system command
|
||||
#- show_host # switch to the host display
|
||||
#- show_guest # switch to the guest display
|
||||
#- toggle_show # switch the current display
|
||||
#- unstick_guest # causes all held keys to be released in the guest
|
||||
#- shutdown # safely shuts the guest system down
|
||||
#- reboot # reboots the guest
|
||||
#- exit # quits screenstub
|
||||
- triggers: [G]
|
||||
modifiers: [LeftMeta]
|
||||
events:
|
||||
- toggle_grab:
|
||||
x:
|
||||
mouse: false # Confine input/mouse to window
|
||||
- toggle_grab:
|
||||
evdev: # evdev grab is useful for playing games that don't work with absolute mouse events
|
||||
exclusive: false # grab exclusive access from the device(s)
|
||||
#new_device_name: "unique-grab-name" # create a new uinput device for this grab
|
||||
xcore_ignore: [absolute] # which events to ignore from the window (key, button, absolute)
|
||||
evdev_ignore: [button] # which events to ignore from the evdev device
|
||||
devices: # List of devices to forward to guest
|
||||
- /dev/input/by-id/usb-Razer_Razer_Naga_Trinity_00000000001A-event-mouse
|
||||
- unstick_host # force-depress all Xorg keys (prevents keys getting stuck)
|
||||
- triggers: [T]
|
||||
modifiers: [LeftMeta]
|
||||
on_release: false
|
||||
events:
|
||||
- toggle_show
|
||||
|
||||
exit_events: # Events to trigger on window close / exit
|
||||
- show_host
|
||||
#- shutdown
|
||||
Loading…
Add table
Add a link
Reference in a new issue