Wrong resolution in display settings on imac with nixos installed

I have an older imac with 5k resolution, connected with two displays. Display configuration shows:

1200x1920 - correct
1200x1920 - should be configurable to 2560 x 1440, but that is not possible. It shows 1200x1920
3840x2160 - should be configurable to 5120 x 2880, but looks really good, so it is possible it has the correct resolution somehow.

I have the following configurations in configuration.nix:

services.xserver.videoDrivers = [ "amdgpu" ];  
services.xserver.extraDisplaySettings = ''
    Depth 24
    Modes "5120x2880"
    Modes "2560x1440"
  '';
hardware.opengl.enable = true;
hardware.opengl.driSupport = true;
hardware.enableRedistributableFirmware = true; 

# I also tried this:
 services.xserver.xrandrHeads = [
    "Screen 0" 
    {

      monitorConfig = 
        ''
          Option "Rotate" "left"
        '';

      output = "DisplayPort-2";
    }

    {
        output = "eDP"; 
        primary = true;
        monitorConfig = ''
          Option "Mode" "5120x2880"
        '';
    }

    {

      monitorConfig = 
        ''
          Option "Rotate" "right"
          Option "Mode" "2560x1440"
        '';

      output = "DisplayPort-1";
    }
  ];

# Using the kde plasma
# Enable the KDE Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;

I think this worked better before the upgrade to 20.03, but that might be just plain luck.

Anyone else using nixos on imac?

Hm… after reboot, I actually got the possibility to select 2560x1440, but on the main display I am still not able to select the 5120 x 2880 mode. This could really be just wrong in the display, because it really look like its 5K resolution.