Hi,
I have NixOS (sway + wayland) running on a HP Dev One, the sound works, and I can control it using amixer
. The issue is I am unable to control the sound volume using the keys on the laptop.
Within /etc/nixos/configuration.nix
there are the following lines:
sound.enable = true;
sound.mediaKeys.enable = true;
Enabling sound.mediaKeys
did not result in functional sound control keys. I then found out what key identifiers map to the sound control keys and added them to services.actkbd.bindings
.
The brightness control keys are setup in the same fashion, and work correctly.
However, the sound control keys still do not work. I can run the commands (without sudo) in a terminal and they do indeed control the sound. I am at a loss to what to try next, any help would be appreciated
services.actkbd = {
enable = true;
bindings = [
{ keys = [ 224 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/light -U 10"; }
{ keys = [ 225 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/light -A 10"; }
{ keys = [ 113 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/amixer -q set Master toggle"; }
{ keys = [ 115 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/amixer -q set Master 5%+"; }
{ keys = [ 114 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/amixer -q set Master 5%-"; }
];
};