gaming: nixos emulation module

This commit is contained in:
ooks-io 2025-01-11 20:18:53 +11:00
parent f59c08deb5
commit 5aae9cdf5d
2 changed files with 33 additions and 0 deletions

View file

@ -3,5 +3,6 @@
./steam.nix
./gamemode.nix
./switch.nix
./emulation.nix
];
}

View file

@ -0,0 +1,32 @@
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf elem;
inherit (config.ooknet.workstation) profiles;
in {
config = mkIf (elem "gaming" profiles) {
services.udev.packages = [
pkgs.dolphin-emu
(pkgs.writeTextFile {
name = "99-nintendo-controller.rules";
text = ''
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", \
MODE="0666";
'';
destination = "/etc/udev/rules.d/40-nintendo-controller.rules";
})
];
boot.extraModulePackages = [
config.boot.kernelPackages.gcadapter-oc-kmod
];
# to autoload at boot:
boot.kernelModules = [
"gcadapter_oc"
];
};
}