Create a .desktop file from script

Hi everyone,

That must be a very basic question, but I’ve read this Nixos wiki on creating nix scripts and I wonder how to make of this a .desktop file in KDE, including an icon path (which would ideally be in the same folder)?

Thanks and all the best,

You can use makeDesktopItem, e.g.:

https://github.com/danieldk/nix-home/blob/d5e38f5380ed51cdf26b5bc04d3b23e8b5a00f4f/cfg/openconnect.nix#L19

1 Like

Thanks a lot @danieldk – it’s working perfectly and I can add an icon attribute to writeScriptBin.