Managing Desktop Entries
This guide explains how to manage custom desktop application launchers and how to hide unwanted shortcuts from application runners (such as Noctalia) via home/misc/.
Architecture & Configuration Files
add-desktop-entry.nix: Declares custom.desktopentries (such as web application wrappers like LINE).hide-desktop-entry.nix: Provides a two-tier mechanism to suppress unwanted application icons.
Two-Tier Hiding Mechanism
Different applications deploy .desktop files into different XDG system and user paths. To account for this, hiding is implemented in two tiers:
Tier 1: appsToHide (Standard / Home Manager)
For standard NixOS system packages and Home Manager applications whose .desktop files live in /run/current-system/sw/share/applications/ or the user profile.
Adding an entry name to appsToHide generates a shadow entry with OnlyShowIn = "X-None;" via Home Manager’s xdg.desktopEntries to hide it from desktop application launchers (like Noctalia):
appsToHide = [ "btop" "mpv" "qimgv" "foot" # ...];Tier 2: annoyingApps (Forced User-Level Override)
Some external runtimes (such as Waydroid or Steam) write .desktop files directly into ~/.local/share/applications/. Because files in ~/.local/share/applications/ have higher XDG precedence than /run/current-system, standard Home Manager shadowing cannot override them.
For these stubborn entries, add the identifier (without .desktop) to annoyingApps. It uses Home Manager’s home.file with force = true to overwrite ~/.local/share/applications/<name>.desktop with NoDisplay=true and Hidden=true:
annoyingApps = [ "rofi" "rofi-theme-selector" "waydroid.com.android.vending"];Finding Desktop Entry Names
Desktop entries often use Reverse-DNS names that differ from their binary name or friendly title (e.g., Amberol is io.bassi.Amberol.desktop, Ark is org.kde.ark.desktop).
Method 1: Search by Filename
Search across the system profile, Home Manager profile, and local directories simultaneously:
find /run/current-system/sw/share/applications \ /etc/profiles/per-user/$USER/share/applications \ ~/.local/share/applications \ -name "*<app-name>*.desktop" 2>/dev/nullOr query specific directories:
- System packages (
environment.systemPackages):Terminal window ls /run/current-system/sw/share/applications | grep -i <app-name> - Home Manager packages (
home.packages):Terminal window ls /etc/profiles/per-user/$USER/share/applications | grep -i <app-name> - User-level runtimes (Waydroid, Flatpak, local installs):
Terminal window ls ~/.local/share/applications | grep -i <app-name>
Method 2: Search by Launcher Display Title
If you only know the friendly name displayed in your launcher (e.g. “Amberol” or “Archive Manager”), search for the Name= field inside all .desktop files:
grep -rn -i "^Name=<Display Name>" \ /run/current-system/sw/share/applications \ /etc/profiles/per-user/$USER/share/applications \ ~/.local/share/applications 2>/dev/nullApplying the Entry Name
Take the matched filename excluding .desktop:
/etc/profiles/per-user/$USER/share/applications/io.bassi.Amberol.desktop→"io.bassi.Amberol"/run/current-system/sw/share/applications/org.kde.ark.desktop→"org.kde.ark"
Add that exact string to appsToHide in home/misc/hide-desktop-entry.nix, or to annoyingApps if it persists.