gaming: nixos emulation module
This commit is contained in:
parent
f59c08deb5
commit
5aae9cdf5d
2 changed files with 33 additions and 0 deletions
|
|
@ -3,5 +3,6 @@
|
||||||
./steam.nix
|
./steam.nix
|
||||||
./gamemode.nix
|
./gamemode.nix
|
||||||
./switch.nix
|
./switch.nix
|
||||||
|
./emulation.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
32
modules/nixos/workstation/gaming/emulation.nix
Normal file
32
modules/nixos/workstation/gaming/emulation.nix
Normal 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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue