nix: switch to pipewire, use pamixer
Anirudh Oppiliappan x@icyphox.sh
Mon, 25 Apr 2022 11:55:50 +0530
2 files changed,
33 insertions(+),
17 deletions(-)
M
nix/hosts/wyndle/configuration.nix
→
nix/hosts/wyndle/configuration.nix
@@ -64,20 +64,31 @@ nvim-nightly
prompt ]; - environment.systemPackages = with pkgs; [ - asusctl - supergfxctl - cwm - man-pages - git - man-pages-posix - (lib.hiPrio pkgs.bashInteractive_5) - ]; - - environment.variables = { - MOZ_USE_XINPUT2 = "1"; - GDK_SCALE = "2"; - GDK_DPI_SCALE = "0.5"; + environment = { + systemPackages = with pkgs; [ + asusctl + supergfxctl + cwm + man-pages + git + man-pages-posix + (lib.hiPrio pkgs.bashInteractive_5) + ]; + variables = { + MOZ_USE_XINPUT2 = "1"; + GDK_SCALE = "2"; + GDK_DPI_SCALE = "0.5"; + }; + etc = { + "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = '' + bluez_monitor.properties = { + ["bluez5.enable-sbc-xq"] = true, + ["bluez5.enable-msbc"] = true, + ["bluez5.enable-hw-volume"] = true, + ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]" + } + ''; + }; }; documentation = {@@ -99,7 +110,6 @@ };
sound.enable = true; hardware = { - pulseaudio.enable = true; bluetooth = { enable = true; powerOnBoot = true;@@ -114,6 +124,12 @@
services = { asusctl.enable = true; supergfxctl.enable = true; + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; xserver = { enable = true; layout = "us";
M
nix/services/sxhkd.nix
→
nix/services/sxhkd.nix
@@ -8,8 +8,8 @@ {
services.sxhkd = { enable = true; keybindings = { - "XF86Audio{Lower,Raise}Volume" = "${pkgs.alsaUtils}/bin/amixer sset Master 2%{-,+}"; - "XF86AudioMute" = "${pkgs.alsaUtils}/bin/amixer sset Master toggle"; + "XF86Audio{Lower,Raise}Volume" = "${pkgs.pamixer}/bin/pamixer -{d,i} 2"; + "XF86AudioMute" = "${pkgs.pamixer}/bin/pamixer -t"; "XF86MonBrightness{Down,Up}" = "${pkgs.brightnessctl}/bin/brightnessctl s 10{-,+}"; "XF86KbdBrightness{Down,Up}" = "${pkgs.brightnessctl}/bin/brightnessctl --device='asus::kbd_backlight' s 1{-,+}"; "XF86AudioMicMute" = "${pkgs.alsaUtils}/bin/amixer set Capture toggle";