HASH 5aae9cdf5d3d
DATE 2025-01-11
SUBJECT gaming: nixos emulation module
FILES 2 CHANGED
HASH 5aae9cdf5d3d
DATE 2025-01-11
SUBJECT gaming: nixos emulation module
FILES 2 CHANGED
┌─ modules/nixos/workstation/gaming/default.nix ─────────────────────────────┐
│ diff --git a/modules/nixos/workstation/gaming/default.nix b/modules/nixos/workstat │
│ ion/gaming/default.nix │
│ index c98c43e..b415fc7 100644 │
│ --- a/modules/nixos/workstation/gaming/default.nix │
│ +++ b/modules/nixos/workstation/gaming/default.nix │
│ @@ -3,5 +3,6 @@ │
│ ./steam.nix │
│ ./gamemode.nix │
│ ./switch.nix │
│ + ./emulation.nix │
│ ]; │
│ } │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...orkstation/gaming/default.nix ───┐
│ diff --git a/modules/nixos/workstation/gamin │
│ g/default.nix b/modules/nixos/workstation/ga │
│ ming/default.nix │
│ index c98c43e..b415fc7 100644 │
│ --- a/modules/nixos/workstation/gaming/defau │
│ lt.nix │
│ +++ b/modules/nixos/workstation/gaming/defau │
│ lt.nix │
│ @@ -3,5 +3,6 @@ │
│ ./steam.nix │
│ ./gamemode.nix │
│ ./switch.nix │
│ + ./emulation.nix │
│ ]; │
│ } │
└──────────────────────────────────────────────┘
┌─ modules/nixos/workstation/gaming/emulation.nix ───────────────────────────┐
│ diff --git a/modules/nixos/workstation/gaming/emulation.nix b/modules/nixos/workst │
│ ation/gaming/emulation.nix │
│ new file mode 100644 │
│ index 0000000..f4c3f30 │
│ --- /dev/null │
│ +++ b/modules/nixos/workstation/gaming/emulation.nix │
│ @@ -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" │
│ + ]; │
│ + }; │
│ +} │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...kstation/gaming/emulation.nix ───┐
│ diff --git a/modules/nixos/workstation/gamin │
│ g/emulation.nix b/modules/nixos/workstation/ │
│ gaming/emulation.nix │
│ new file mode 100644 │
│ index 0000000..f4c3f30 │
│ --- /dev/null │
│ +++ b/modules/nixos/workstation/gaming/emula │
│ tion.nix │
│ @@ -0,0 +1,32 @@ │
│ +{ │
│ + lib, │
│ + config, │
│ + pkgs, │
│ + ... │
│ +}: let │
│ + inherit (lib) mkIf elem; │
│ + inherit (config.ooknet.workstation) profi │
│ les; │
│ +in { │
│ + config = mkIf (elem "gaming" profiles) { │
│ + services.udev.packages = [ │
│ + pkgs.dolphin-emu │
│ + (pkgs.writeTextFile { │
│ + name = "99-nintendo-controller.rule │
│ s"; │
│ + text = '' │
│ + SUBSYSTEM=="usb", ENV{DEVTYPE}==" │
│ usb_device", \ │
│ + ATTRS{idVendor}=="057e", ATTRS{id │
│ Product}=="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" │
│ + ]; │
│ + }; │
│ +} │
└──────────────────────────────────────────────┘
[ BACK TO LOG ]
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET