Sound option deprecated, media keys not working

Hi all,

Currently running NixOS with Sway as my window manager. Recently I tried to run a nixos-rebuild switch and was getting this error:

Failed assertions:
       - The option definition `sound' in `/etc/nixos/configuration.nix' no longer has any effect; please remove it.
       The option was heavily overloaded and can be removed from most configurations.

Previously in my configuration file I had:

sound = {
  enable = true;
  mediaKeys.enable = true;
};

If I comment out the sound option the config will build, but I don’t have use of the volume keys anymore. If I run wev and press the media keys, they are not detected. Is there a known change I need to make? Please let me know if I need to share more of my config file.

The deprecation notice is a bit confusing – the media keys feature has been removed, see the sound options removal section of 24.11 release notes.