Hello dear NixOS wizards and happy new year
I try to run a appimage of an application called espanso.
I’m aware that this app there is also a package and service on Nix available: Link.
The problem with it is that the Nix version is 0.7.3 while the most recent version of espanso is 2.1.8 and they are pretty different by now. So I try running it with appimage.
The software works fine so far after installing the appimage-run package.
I can run the app with cd ~/opt && appimage-run Espanso.AppImage start --unmanaged
I have the latest NixOS version 22.11 installed
Here is what I tried with systemd so far:
systemd.services.espanso-unmanaged = {
script = ''
cd /home/-/opt && appimage-run Espanso.AppImage start --unmanaged
'';
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
};
when boot up fresh and check the service with “systemctl status espanso-unmanaged” there will be this error:
○ espanso-unmanaged.service
Loaded: loaded (/etc/systemd/system/espanso-unmanaged.service; enabled; pr>
Active: inactive (dead)
after starting the service there will be this error message:
× espanso-unmanaged.service
Loaded: loaded (/etc/systemd/system/espanso-unmanaged.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Sun 2023-01-01 10:54:50 CET; 7min ago
Duration: 23ms
Process: 3064 ExecStart=/nix/store/hl1qbcgdh2j5hqf086amlhq3hp8vyci1-unit-script-espanso-unmanaged-start/bin/espanso-unmanaged-start (code=exited, status=127)
Main PID: 3064 (code=exited, status=127)
IP: 0B in, 0B out
CPU: 7ms
Jan 01 10:54:50 MacBookPro systemd[1]: Started espanso-unmanaged.service.
Jan 01 10:54:50 MacBookPro espanso-unmanaged-start[3066]: /nix/store/hl1qbcgdh2j5hqf086amlhq3hp8vyci1-unit-script-espanso-unmanaged-start/bin/espanso-unmanaged-start: line 3: appimage-run: command not found
Jan 01 10:54:50 MacBookPro systemd[1]: espanso-unmanaged.service: Main process exited, code=exited, status=127/n/a
Jan 01 10:54:50 MacBookPro systemd[1]: espanso-unmanaged.service: Failed with result 'exit-code'.
I guess it’s mainly this problem:
line 3: appimage-run: command not found
“which appimage-run” gives me /run/current-system/sw/bin/appimage-run, when I use this in the systemd service I get the same error message.
What can I do to solve this?
Thank you for your answer in advance.