aboutsummaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorschererleander <leander@schererleander.de>2025-04-29 20:36:46 +0200
committerschererleander <leander@schererleander.de>2025-04-29 20:36:46 +0200
commitec0137a61d11c12cdef8e1dbd515315077be9c72 (patch)
tree5ae14dc5130406569acc7e3e4c2d35ecff800aa9 /hosts
parent8342f3abaf4167aec9845c173e3325f4fc80a2c3 (diff)
move modules
Diffstat (limited to 'hosts')
-rw-r--r--hosts/nixos/audio.nix16
-rw-r--r--hosts/nixos/configuration.nix3
-rw-r--r--hosts/nixos/home.nix4
-rw-r--r--hosts/nixos/wooting.nix34
4 files changed, 54 insertions, 3 deletions
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
+ ];
+ };
+}
+