From ec0137a61d11c12cdef8e1dbd515315077be9c72 Mon Sep 17 00:00:00 2001 From: schererleander Date: Tue, 29 Apr 2025 20:36:46 +0200 Subject: move modules --- hosts/nixos/audio.nix | 16 ++++++++++++++++ hosts/nixos/configuration.nix | 3 ++- hosts/nixos/home.nix | 4 ++-- hosts/nixos/wooting.nix | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 hosts/nixos/audio.nix create mode 100644 hosts/nixos/wooting.nix (limited to 'hosts/nixos') diff --git a/hosts/nixos/audio.nix b/hosts/nixos/audio.nix new file mode 100644 index 0000000..4757803 --- /dev/null +++ b/hosts/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/hosts/nixos/configuration.nix b/hosts/nixos/configuration.nix index 5d8578c..a582e7b 100644 --- a/hosts/nixos/configuration.nix +++ b/hosts/nixos/configuration.nix @@ -4,7 +4,8 @@ imports = [ ./hardware-configuration.nix - ../../modules/nixos + ./audio.nix + ./wooting.nix ]; # Bootloader. diff --git a/hosts/nixos/home.nix b/hosts/nixos/home.nix index 114dc72..2a22851 100644 --- a/hosts/nixos/home.nix +++ b/hosts/nixos/home.nix @@ -3,7 +3,7 @@ { imports = [ inputs.spicetify-nix.homeManagerModules.spicetify - ../../modules/home-manager + ../../modules ]; home.username = "leander"; @@ -13,6 +13,7 @@ home.packages = with pkgs; [ firefox + obsidian fzf imv @@ -60,6 +61,5 @@ sway.enable = true; waybar.enable = true; spicetify.enable = true; - nixcord.enable = true; home.stateVersion = "24.11"; } diff --git a/hosts/nixos/wooting.nix b/hosts/nixos/wooting.nix new file mode 100644 index 0000000..eadfe9c --- /dev/null +++ b/hosts/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 + ]; + }; +} + -- cgit v1.3.1