This Nix overlay fixes Dolphin's "Open with" menu when running outside of KDE (e.g., under Hyprland or other Wayland compositors).
- Dolphin relies on KDE's KService framework to populate its "Open with" menu
- Without KDE, the menu configuration file (
applications.menu) is not found - This overlay sets the correct
XDG_CONFIG_DIRSto include the Qt5 KService which does include theapplications.menu
- Dolphin uses KDE's service cache (ksycoca) to find available applications
- Without KDE, the cache is not properly built or updated
- This overlay runs
kbuildsycoca6 --noincrementalbefore Dolphin starts to ensure the cache is up-to-date with the correct menu configuration by using the Qt5 KService resources
- Choose one of the following methods to add the overlay:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
dolphin-overlay.url = "github:rumboon/dolphin-overlay";
};
outputs = { self, nixpkgs, dolphin-overlay, ... }: {
nixosConfigurations.your-host = nixpkgs.lib.nixosSystem {
modules = [
{
nixpkgs.overlays = [ dolphin-overlay.overlays.default ];
}
];
};
};
}Clone this repository and add to your NixOS configuration:
{ config, pkgs, ... }:
{
nixpkgs.overlays = [
(import /path/to/dolphin-overlay/default.nix)
];
}- Rebuild your system:
sudo nixos-rebuild switchThe overlay modifies the Dolphin package by:
- Setting the correct
XDG_CONFIG_DIRSenvironment variable - Rebuilding the KDE service cache before launching Dolphin
This approach is non-intrusive as it only affects the dolphin package and does not modify global environment variables or system-wide configurations.
- Properly populated "Open with" menu in Dolphin
- Works without a full KDE installation
- No global environment modifications
- Automatic cache rebuilding on launch