HASH bfd9b8a4800b
DATE 2025-05-19
SUBJECT gaming: move udev rules to services.udev
FILES 1 CHANGED
HASH bfd9b8a4800b
DATE 2025-05-19
SUBJECT gaming: move udev rules to
services.udev
FILES 1 CHANGED
┌─ modules/nixos/workstation/gaming/emulation.nix ───────────────────────────┐
│ diff --git a/modules/nixos/workstation/gaming/emulation.nix b/modules/nixos/workst │
│ ation/gaming/emulation.nix │
│ index f4c3f30..fce9eb2 100644 │
│ --- a/modules/nixos/workstation/gaming/emulation.nix │
│ +++ b/modules/nixos/workstation/gaming/emulation.nix │
│ @@ -8,18 +8,14 @@ │
│ 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"; │
│ - }) │
│ - ]; │
│ + services.udev = { │
│ + packages = [ │
│ + pkgs.dolphin-emu │
│ + ]; │
│ + extraRules = '' │
│ + SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", AT │
│ TRS{idProduct}=="0337", MODE="0666" │
│ + ''; │
│ + }; │
│ boot.extraModulePackages = [ │
│ config.boot.kernelPackages.gcadapter-oc-kmod │
│ ]; │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...kstation/gaming/emulation.nix ───┐
│ diff --git a/modules/nixos/workstation/gamin │
│ g/emulation.nix b/modules/nixos/workstation/ │
│ gaming/emulation.nix │
│ index f4c3f30..fce9eb2 100644 │
│ --- a/modules/nixos/workstation/gaming/emula │
│ tion.nix │
│ +++ b/modules/nixos/workstation/gaming/emula │
│ tion.nix │
│ @@ -8,18 +8,14 @@ │
│ 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"; │
│ - }) │
│ - ]; │
│ + services.udev = { │
│ + packages = [ │
│ + pkgs.dolphin-emu │
│ + ]; │
│ + extraRules = '' │
│ + SUBSYSTEM=="usb", ENV{DEVTYPE}=="us │
│ b_device", ATTRS{idVendor}=="057e", ATTRS{id │
│ Product}=="0337", MODE="0666" │
│ + ''; │
│ + }; │
│ boot.extraModulePackages = [ │
│ config.boot.kernelPackages.gcadapter- │
│ oc-kmod │
│ ]; │
└──────────────────────────────────────────────┘
[ BACK TO LOG ]
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET