games: init profile
This commit is contained in:
parent
080716f496
commit
22e631f6c9
3 changed files with 68 additions and 1 deletions
|
@ -4,10 +4,11 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../users/nrd
|
../profiles/games
|
||||||
../profiles/misc
|
../profiles/misc
|
||||||
../profiles/misc/plex.nix
|
../profiles/misc/plex.nix
|
||||||
../profiles/misc/torrent.nix
|
../profiles/misc/torrent.nix
|
||||||
|
../users/nrd
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [
|
||||||
|
|
21
profiles/games/default.nix
Normal file
21
profiles/games/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [ ../graphical ./udev.nix ];
|
||||||
|
environment.systemPackages = with pkgs;
|
||||||
|
[ retroarchBare steam steam-run ];
|
||||||
|
|
||||||
|
# fps games on laptop need this
|
||||||
|
services.xserver.libinput.disableWhileTyping = false;
|
||||||
|
|
||||||
|
# 32-bit support needed for steam
|
||||||
|
hardware.opengl.driSupport32Bit = true;
|
||||||
|
hardware.pulseaudio.support32Bit = true;
|
||||||
|
|
||||||
|
# better for steam proton games
|
||||||
|
systemd.extraConfig = "DefaultLimitNOFILE=1048576";
|
||||||
|
|
||||||
|
# improve wine performance
|
||||||
|
environment.sessionVariables = {
|
||||||
|
WINEDEBUG = "-all";
|
||||||
|
};
|
||||||
|
}
|
45
profiles/games/udev.nix
Normal file
45
profiles/games/udev.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{
|
||||||
|
# correct controller support for steam
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
# This rule is needed for basic functionality of the controller in Steam and keyboard/mouse emulation
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"
|
||||||
|
|
||||||
|
# This rule is necessary for gamepad emulation
|
||||||
|
KERNEL=="uinput", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput"
|
||||||
|
|
||||||
|
KERNEL=="js*", MODE="0660", GROUP="input"
|
||||||
|
|
||||||
|
# Valve HID devices over USB hidraw
|
||||||
|
KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"
|
||||||
|
|
||||||
|
# Valve HID devices over bluetooth hidraw
|
||||||
|
KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0666"
|
||||||
|
|
||||||
|
# DualShock 4 over USB hidraw
|
||||||
|
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666"
|
||||||
|
|
||||||
|
# DualShock 4 wireless adapter over USB hidraw
|
||||||
|
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", MODE="0666"
|
||||||
|
|
||||||
|
# DualShock 4 Slim over USB hidraw
|
||||||
|
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"
|
||||||
|
|
||||||
|
# DualShock 4 over bluetooth hidraw
|
||||||
|
KERNEL=="hidraw*", KERNELS=="*054C:05C4*", MODE="0666"
|
||||||
|
|
||||||
|
# DualShock 4 Slim over bluetooth hidraw
|
||||||
|
KERNEL=="hidraw*", KERNELS=="*054C:09CC*", MODE="0666"
|
||||||
|
|
||||||
|
# DualShock 3 controller, Bluetooth
|
||||||
|
KERNEL=="hidraw*", KERNELS=="*054C:0268*", MODE="0660", TAG+="uaccess"
|
||||||
|
|
||||||
|
# DualShock 3 controller, USB
|
||||||
|
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", MODE="0660", TAG+="uaccess"
|
||||||
|
|
||||||
|
# Nintendo Switch Pro Controller over USB hidraw
|
||||||
|
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0666"
|
||||||
|
|
||||||
|
# Nintendo Switch Pro Controller over bluetooth hidraw
|
||||||
|
KERNEL=="hidraw*", KERNELS=="*057E:2009*", MODE="0666"
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue