I’m trying to configure systemd unit for NixOS. My problem is that binary that has to be executed by the unit, should be executed from the directory with that binary, rather then from the root(/
) of the environment of the systemd unit. That’s why my ExecStart
option firstly uses cd
to change directory to the correct one:
ExecStart =
"cd ${pkgs.alps}/bin && ./alps";
But unit fails with error that it unable to find cd binary.
As I know, binaries should be referenced in Nix, using the following scheme ${pkgs.pkgName}/bin/pkgName
(mostly) and also that package should be added to PATH
of the systemd unit.
So I’m wondering, in which package(or path), cd binary can be found?