Rofi is a window switcher, run dialog, ssh-launcher and dmenu replacement.

Installation

You can install Rofi simply with:

❄︎ /etc/nixos/configuration.nix
environment.systemPackages = [
  pkgs.rofi
];

Home Manager

For a more declarative setup you can use Home Manager. You can find more options at programs.rofi in Home Manager options.

A simple example:

❄︎ /etc/nixos/home.nix
programs.rofi = {
    enable = true;
    theme = "sidebar";
    font = "sans-serif";
    package = pkgs.rofi;
    modes = [
      "drun"
      "run"
      "window"
      "ssh"  
    ];
    extraConfig = {
      show-icons = true;
    };
  };