Asking for raw beginner help. I have installed libreoffice but there is no icon or menu item.
I inserted libreoffice-qt in enviroment.systemPackages and also tried it as pkgs.libreoffice-qt. Neither produce desktop icons or menu items. How does one add desktop icons and menu items?
Edit:
I uncommented Thunderbird in user.user and now the office menu items appear. I reverted back removing the pkgs prefix to libreoffice and rebuilt. The menu items are still there. I commented out libreoffice entirely and rebuilt. The office menu items are still there but using them results in “failed to execute…” I’m now confused about NIxOS. I thought the build created the entire system. Am I doing something wrong by editing the configuration.nix file? Why is the menu still there after a build? is there an entry missing from the configuration file that handles menus? Are reboots necessary?
Please explain the philosophy of NixOS that I appear to be missing. Thanks. (I really like the concept of a parameter driven system.)
I’m not just dumping here. It seems from various posts that the system is supposed to do this automatically. In the NixOS manual the only entry I can find is this in the suwayomi section.
If you want to create a desktop icon, you can activate the system tray option:
Hey there, no thinks you are dumping – it’s just a community forum and it shouldn’t be surprising if it takes a day or two to get a response sometimes. It’s just regular users and enthusiasts, and sometimes people who also do great work volunteering their time to build a project we all love. It’s not a chat, and it isn’t paid support for a product, and it’s the weekend and many of the most Nix-involved people are at NixCon right now.
Check /run/current-system/sw/share/applications/ for writer.desktop or startcenter.desktop to know if they are part of your system image. Instead of /run/current-system you can use /nix/var/nixprofiles/system-[INSERT NUMBER]-link/sw/share/applications/ to check a specific generation.
Whether or not new desktop files get picked up depends on your desktop environment/window manager and how it constructs the menu state. In other words, if a menu is constructed in your DE/WM’s memory from a scan at a single point in time and then you change the system image, then yes you need to convince your DE/WM to redo that scan. This is very DE/WM specific.
In general for these types of things that hold state it’s best to at least attempt a reboot if it isn’t working the way you expect it to. It’s not the issue you are currently having, but in particular, whenever the kernel or kernel drivers change, I would definitely recommend a reboot since it’s not really possible to coherently hotswap these. At the very least it’s not implemented that way as far as I am aware.
To understand what’s happening you have to understand how XDG desktop files get “installed” by NixOS before they end up in your DE’s application launcher.
Whatever DE (or DE-independent application launcher) you use, all of them follow the XDG desktop entry spec to figure out what icons to show you.
This spec declares that your launcher should scan directiories in the $XDG_DATA_DIRS directories for .desktop files to display.
NixOS in turn works by swapping out directories and variables for others. If you run nixos-rebuild switch, NixOS will update various symlinks for you.
How does that cause a change in which .desktop files are installed? Well, you swap out the directory in /run/current-system/var/lib (or something along those lines, I forget the exact path). This results in a new set of desktop directories for the launcher to scan.
What can go wrong however is that your launcher may not expect this method of “installation”. It might hold on to the path that was symlinked to, or it might simply not update its cache. It might not re-read $XDG_DATA_DIRS until your /etc/profile is re-loaded.
Generally, NixOS cannot guarantee that running software updates correctly. To ensure that you don’t end up with a partial upgrade, use nixos-rebuild boot and reboot instead.