dotfiles/nixos/configs/dotfiles/talon.hm.nix

38 lines
1 KiB
Nix

{ pkgs, ... }:
{
# talon configuration
home.file.".talon/user".source = ../../../talon;
# 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
${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;
};
}