{ pkgs, ... }:
{
  # talon configuration
	# note: this *must* be recursive instead of one big link,
	# since talon wants to stick files in here, too
  home.file.".talon/user" = {
    source = ../../talon;
    recursive = true;
  };

  # talon -program-
  home.file.".talon/core" = {
		enable = pkgs.stdenv.isLinux;
    source = fetchTarball {
  		url = "https://talonvoice.com/dl/latest/talon-linux.tar.xz";
  		sha256 = "0n7538lq79wwh0djihpkhin3iqmvrmsws16dhfmck65kk67jj4wl";
    };
  };

  # talon -runner-
  home.file.".talon/bin/talon" = {
		enable = pkgs.stdenv.isLinux;
    executable = true;
    text = if pkgs.stdenv.isAarch64 then
			"" # FIXME TODO
    else
    ''
      #!${pkgs.bash}/bin/bash
      set -ue
      base=/home/deprekated/.talon/core
      unset QT_AUTO_SCREEN_SCALE_FACTOR QT_SCALE_FACTOR

			# Make sure this knows how to access our display.
      DISPLAY=:0

      ${pkgs.steam-run}/bin/steam-run env LC_NUMERIC=C QT_PLUGIN_PATH="$base/lib/plugins" LD_LIBRARY_PATH="$base/lib:$base/resources/python/lib:$base/resources/pypy/lib" "$base/talon" "$@"
    '';
  };

  # talon desktop file
  xdg.desktopEntries.talon = {
    name = "Talon Voice";
		exec = "/home/deprekated/.talon/bin/talon";
		icon = ./talon-community-logo.png;
  };
}
