From c629d170a3b1617a73ff481dff2319cd02e2a84c Mon Sep 17 00:00:00 2001 From: Chris Toph Date: Sun, 20 Apr 2025 13:31:21 -0400 Subject: [PATCH] Updates audio and kernel configs; Fixes Bluetooth - Adds full PulseAudio package configuration - Refines Bluetooth settings, enabling power-on boot and adding extra tools/configs - Switches to zen kernel and adjusts CPU microcode update option --- hosts/common/optional/audio.nix | 3 +++ hosts/common/optional/bluetooth.nix | 33 +++++++++++++++++++++++------ hosts/nixos/rune/hardware.nix | 6 +++--- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/hosts/common/optional/audio.nix b/hosts/common/optional/audio.nix index aab56b9..8232b14 100644 --- a/hosts/common/optional/audio.nix +++ b/hosts/common/optional/audio.nix @@ -4,6 +4,9 @@ inputs.nix-gaming.nixosModules.pipewireLowLatency ]; + hardware.pulseaudio = { + package = pkgs.pulseaudioFull; + }; services.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { diff --git a/hosts/common/optional/bluetooth.nix b/hosts/common/optional/bluetooth.nix index 75f37c4..e8ac142 100644 --- a/hosts/common/optional/bluetooth.nix +++ b/hosts/common/optional/bluetooth.nix @@ -1,22 +1,41 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { hardware.bluetooth = { enable = true; - package = pkgs.bluez5-experimental; + package = pkgs.bluez-experimental; + powerOnBoot = true; settings = { + LE = { + MinConnectionInterval = 16; + MaxConnectionInterval = 16; + ConnectionLatency = 10; + ConnectionSupervisionTimeout = 100; + }; + Policy = { + AutoEnable = "true"; + }; # make Xbox Series X controller work General = { - Class = "0x000100"; - ControllerMode = "bredr"; + Enable = "Source,Sink,Media,Socket"; FastConnectable = true; JustWorksRepairing = "always"; - Privacy = "device"; # Battery info for Bluetooth devices Experimental = true; }; }; }; - # https://github.com/NixOS/nixpkgs/issues/114222 - systemd.user.services.telephony_client.enable = false; + services.blueman.enable = true; + # these 2 options below were not mentioned in wiki + + boot = { + extraModprobeConfig = '' + options bluetooth enable_ecred=1 + ''; + }; + + environment.systemPackages = with pkgs; [ + bluez-tools + bluetuith # can transfer files via OBEX + ]; } diff --git a/hosts/nixos/rune/hardware.nix b/hosts/nixos/rune/hardware.nix index 859f92f..4aff2da 100644 --- a/hosts/nixos/rune/hardware.nix +++ b/hosts/nixos/rune/hardware.nix @@ -25,8 +25,8 @@ timeout = 3; }; - # use latest kernel - kernelPackages = pkgs.linuxPackages_latest; + # Use the zen kernel for better performance + kernelPackages = pkgs.linuxPackages_zen; initrd = { systemd.enable = true; @@ -99,6 +99,6 @@ # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableAllFirmware; }