Unable to play media in browser in fresh NixOS 20.03 installation

I tried a bunch of different things today and I got it working! I had to add this to my configuration.nix:

nixpkgs.config = {
    allowUnfree = true;
    vivaldi = {
      proprietaryCodecs = true;
      enableWideVine = true;
    };
  };

Note to future self: From reading the vivaldi derivation you saw that there’s a build option proprietaryCodecs which has default value false.