(Read the If you use nixos-unstable...
part first if you use nixos-unstable)
Touchegg is something I am also interested but I haven’t got time to actually investigate 
It looks like both touchegg and touche does not load system config if a user config exists, so to get things configured, I imagine you just need to edit ~/.config/touchegg/touchegg.conf
.
Unfortunately sounds like touche checks if you have touchegg installed by checking system config existence, and in detail, it first checks XDG_CONFIG_DIRS
, then a fallback path that can be configured by a meson option.
Looking at flatpak touche’s manifest, the fallback path is set to /var/run/host/usr/share/touchegg/touchegg.conf
so we can only do something with XDG_CONFIG_DIRS
instead. I am quite lazy here and just did something dirty, I added this to my NixOS config:
{
# This file is useless since touchegg will use the user config instead.
environment.etc."xdg/touchegg/touchegg.conf".text = "<touchégg></touchégg>";
}
So we can find this file in /etc/xdg/touchegg/touchegg.conf
, now we tell flatpak touche this file (the /var/run/host
prefix is needed here):
$ flatpak override --user --env=XDG_CONFIG_DIRS=/var/run/host/etc/xdg com.github.joseexposito.touche
Flatpak touche now opens for me and can edit my ~/.config/touchegg/touchegg.conf
:
Though I am asking myself why am I so lazy to properly package this in Nix, so we can just pass a good meson flag to fix the touchegg detection 
If you use nixos-unstable…
It is probably worth to mention that starting from Cinnamon 5.8, cinnamon itself can act as a touchegg client, and it doesn’t sound like this client will respect any of the touchegg.conf
files, instead you need to play with gsettings (you can also just use cinnamon-settings gestures
to do the settings in GUI):
$ gsettings get org.cinnamon.gestures swipe-up-3
'TOGGLE_OVERVIEW'
The original touchegg client however, is now blocked by cinnamon-session. Well I imagine it is not good to have multiple clients and I do recommend the cinnamon one if it already works fine. If you do need the upstream client, I can imagine (did not test) that you can unblock that by:
$ gsettings set org.cinnamon.SessionManager autostart-blacklist "['gnome-settings-daemon', 'org.gnome.SettingsDaemon', 'gnome-fallback-mount-helper', 'gnome-screensaver', 'mate-screensaver', 'mate-keyring-daemon', 'indicator-session', 'gnome-initial-setup-copy-worker', 'gnome-initial-setup-first-login', 'gnome-welcome-tour', 'xscreensaver-autostart', 'nautilus-autostart', 'caja', 'xfce4-power-manager']"
And disable the cinnamon one:
$ gsettings set org.cinnamon.gestures enabled false