Can someone check me on this zide install?

Trying to run zide from a Hyprland keybind.

I’ve added the following to Home Manager (home.nix):

    home.file = {
      ".config/zide".source = pkgs.fetchFromGitHub {
        owner = "josephschmitt";
        repo = "zide";
        rev = "a0903f9a503f2261e768aa7c23628921c027a88e";
        hash = "sha256-Ten0Jme1wVDsUhRY/ggPY1fKwYRw0FiQWSQqVij3nHI=";
      };
    };

  programs.bash = {
    bashrcExtra = ''
      export PATH="$PATH:$HOME/.config/zide/bin"
    '';
  };

Now I’m able to run it from terminal with:
alacritty -e zide ~/.config/nixos default_lazygit

But when I try adding a keybind to my hyprland config, nothing works. I’ve tried:

"$mainMod, T, exec, alacritty -e zide ~/.config/nixos default_lazygit"
"$mainMod, T, exec, alacritty -e zide '~/.config/nixos default_lazygit'"
"$mainMod, T, exec, alacritty -e \"zide ~/.config/nixos default_lazygit\""

Any suggestions as to what I’m doing wrong?

Because the path is not in the environment of hyperland. You could add the full path to the binary in your hyperland config.

The other way would be to create a package for that binary and use lib.getExe in your hyprland config. I think that would be more ‘the nix way’.

I added the following to my hyprland config:

      env = [
        "PATH,$HOME/.config/zide/bin:$PATH"
      ]

And set the keybind to:

"$mainMod, T, exec, alacritty -e zide ~/.config/nixos default_lazygit"

But it unfortunately still doesn’t work.

Nevermind. That works! I forgot the key component - log out and log back in again. :sweat_smile:

Thank you for the help.

1 Like