anchor.diff:          pkgs.shared-mime-info # for update-mime-database
           pkgs.xdg-user-dirs # Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
         ];
  +    })
  +
  +    # Enable soft realtime scheduling, only supported on wayland
  +    (mkIf serviceCfg.experimental-features.realtime-scheduling {
  +      security.wrappers.".gnome-shell-wrapped" = {
  +        source = "${pkgs.gnome3.gnome-shell}/bin/.gnome-shell-wrapped";
  +        capabilities = "cap_sys_nice=ep";
  +      };
  +
  +      systemd.user.services.gnome-shell-wayland = let
  +        gnomeShellRT = with pkgs.gnome3; pkgs.runCommand "gnome-shell-rt" {} ''
  +          mkdir -p $out/bin/
  +          cp ${gnome-shell}/bin/gnome-shell $out/bin
  +          sed -i "s@${gnome-shell}/bin/@${config.security.wrapperDir}/@" $out/bin/gnome-shell
  +        '';
  +      in {
  +        # Note we need to clear ExecStart before overriding it
  +        serviceConfig.ExecStart = ["" "${gnomeShellRT}/bin/gnome-shell"];
  +        # Do not use the default environment, it provides a broken PATH
  +        environment = mkForce {};
  +      };
       })
   
       # Adapt from https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/gnome-3-36/elements/core/meta-gnome-core-utilities.bst
  
positive.code:       core-shell.enable = mkEnableOption "GNOME Shell services";
        core-utilities.enable = mkEnableOption "GNOME core utilities";
        games.enable = mkEnableOption "GNOME games";
      };
  
      services.xserver.desktopManager.gnome3 = {
  
negative.code:         source-code-pro # Default monospace font in 3.32
          source-sans-pro
        ];
  
        # Adapt from https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/gnome-3-36/elements/core/meta-gnome-core-shell.bst
        environment.systemPackages = with pkgs.gnome3; [
  