pkgs.writeTextFile doesn't like spaces in filenames. This is fixed in #162246, but other tools will probably dislike spaces in .desktop file names as well, and that PR will take forever, so let's fix this anyway.
Notably: - remove explicit arguments that match the defaults - convert everything to the right Nix types