diff options
Diffstat (limited to 'modules/nixos')
| -rw-r--r-- | modules/nixos/audio.nix | 16 | ||||
| -rw-r--r-- | modules/nixos/default.nix | 6 | ||||
| -rw-r--r-- | modules/nixos/wooting.nix | 34 |
3 files changed, 56 insertions, 0 deletions
diff --git a/modules/nixos/audio.nix b/modules/nixos/audio.nix new file mode 100644 index 0000000..4757803 --- /dev/null +++ b/modules/nixos/audio.nix @@ -0,0 +1,16 @@ +{ config, pkgs, lib, ... }: + +let + cfg = config.audio; +in { + options.audio.enable = lib.mkEnableOption "Enable audio with pipewire"; + config = lib.mkIf cfg.enable { + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + }; +} diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix new file mode 100644 index 0000000..75e6fad --- /dev/null +++ b/modules/nixos/default.nix @@ -0,0 +1,6 @@ +{ pkgs, lib, ... }: { + imports = [ + ./audio.nix + ./wooting.nix + ]; +} diff --git a/modules/nixos/wooting.nix b/modules/nixos/wooting.nix new file mode 100644 index 0000000..eadfe9c --- /dev/null +++ b/modules/nixos/wooting.nix @@ -0,0 +1,34 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.wooting; +in { + options.wooting.enable = lib.mkEnableOption "Enable Wooting udev rules"; + + config = lib.mkIf cfg.enable { + services.udev.extraRules = '' + # Wooting One Legacy + SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", TAG+="uaccess" + SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", TAG+="uaccess" + + # Wooting One update mode + SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", TAG+="uaccess" + + # Wooting Two Legacy + SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", TAG+="uaccess" + SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", TAG+="uaccess" + + # Wooting Two update mode + SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403", TAG+="uaccess" + + # Generic Wootings + SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", TAG+="uaccess" + SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", TAG+="uaccess" + ''; + + environment.systemPackages = with pkgs; [ + wootility + ]; + }; +} + |
