lion
March 2, 2024, 12:58pm
1
I’ve followed some instructions to, at the very least, show home-manager installed applications upon logging out and back in using the following:
programs.fish.enable = true;
targets.genericLinux.enable = true;
The issue is that I have to go through the logging out process to have the applications show up in the application launcher.
Is there a permanent or temporary fix? Can I forcibly refresh the applications index?
3 Likes
I’m also seeing this problem. Did you ever find a solution?
1 Like
Hi , just bumping this issue because I would love to know how to refresh KDE menu caché or maybe add an hook that does this after install
Check if this issue has some solution that would help: installed apps don’t show up in Ubuntu's "Show Applications" · Issue #1439 · nix-community/home-manager · GitHub
The issue is about Ubuntu, which is using Gnome, but users have been posting fixes there confusingly for other DEs too. Leading to fixes which work for one DE, but not for others.
I’ve fixed this for myself with a module like this:
{ config, lib, ... }:
{
home.activation.linkDesktopApplications = {
after = [ "writeBoundary" "createXdgUserDirectories" ];
before = [ ];
data = ''
rm -rf ${config.xdg.dataHome}/nix-desktop-files/applications
mkdir -p ${config.xdg.dataHome}/nix-desktop-files/applications
cp -Lr ${config.home.homeDirectory}/.nix-profile/share/applications/* ${config.xdg.dataHome}/nix-desktop-files/applications/
'';
};
xdg.enable = true;
xdg.systemDirs.data = [ "${config.xdg.dataHome}/nix-desktop-files" ];
}
Note that I’m using Kubuntu 24.04 which is still stuck with Plasma 5, so I’m not sure if this applies for Plasma 6.
With the fix, installed applications immediately appear in KDE’s launcher. I have had no need to try force update of the cache. Nor to do relogin.