How to configure Rofi's grid.rasi the nixy way?

At the bottom of my rofi config, I’m using xdg.configFile."rofi/grid.rasi".text = to define the grid.rasi file used for my emojis (as shown below). I wasn’t able to find any home-manager options to do this (a little more) the nix way.

Does anyone know a better way of declaring the grid.rasi file or is this as good as it gets?

   { config, ... }: {
   
       programs.rofi = {
         enable = true;
         theme = let
           inherit (config.lib.formats.rasi) mkLiteral;
         in {
           configuration = {
               modes = map mkLiteral [ "combi" ];
               combi-modes = map mkLiteral [ "window" "drun" "run" "ssh" "filebrowser" "combi" ];
               display-drun =               "󱓞";
               display-run =                "";
...

...
      "#button.selected" = {
          background-color = mkLiteral "@selected-normal-background";
          text-color =       mkLiteral "@selected-normal-foreground";
          border-radius =    mkLiteral "7px";
      };
    };
  };

  xdg.configFile."rofi/grid.rasi".text = ''
    @import "config"

    textbox {
      vertical-align:   0.5;
      horizontal-align: 0.5;
    }

    listview {
      columns:       9;
      lines:         7;
      cycle:         true;
      dynamic:       true;
      layout:        vertical;
      flow:          horizontal;
      reverse:       false;
      fixed-height:  true;
      fixed-columns: true;
    }

    element {
      orientation: vertical;
    }

    element-text {
      vertical-align:   0.5;
      horizontal-align: 0.5;
      font:            "FiraCode Nerd Font 24";
    }
  '';
}