From ade6481b390c9061844ccc7f76798ac18a7276c0 Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 3 Jun 2022 15:08:57 -0700 Subject: [PATCH] sway: enable audio media keys don't work (except in VLC!) --- helpers/gui/sway.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/helpers/gui/sway.nix b/helpers/gui/sway.nix index a3df4c6cb..760707054 100644 --- a/helpers/gui/sway.nix +++ b/helpers/gui/sway.nix @@ -6,6 +6,7 @@ # we configure sway with home-manager, but this enable gets us e.g. opengl and fonts enable = true; }; + # TODO: should be able to use SDDM to get interactive login services.greetd = { enable = true; @@ -18,5 +19,31 @@ }; }; + # unlike other DEs, sway configures no audio stack + + # sound (ALSA): https://nixos.wiki/wiki/ALSA + # test with `alsamixer`, `aplay -t raw /dev/urandom` + # sound = { + # enable = true; + # mediaKeys.enable = true; + # }; + # hardware.pulseaudio.enable = true; + # hardware.pulseaudio.support32Bit = true; ## If compatibility with 32-bit applications is desired. + + # # disable PC-speaker + # boot.blacklistedKernelModules = [ "snd_pcsp" ]; + # # enable the right driver (`cat /proc/asound/modules`) + # boot.extraModprobeConfig = '' + # options snd slots=snd-hda-intel + # options snd_hda_intel enable=0,1 + # ''; + + # administer with pw-cli, pw-mon, pw-top commands + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; # ?? + pulse.enable = true; + }; }