That systemd Service file is moved to $out/lib/systemd/system/.
============
If I want to package an app that has systemd files, should I:
a) Move the systemd files to $out and then just add some minimal configuration like in the Syncthing NixOS module.
What is the minimal config. in this case?
b) Ignore app.service files provided by the app author and create a new systemd service in NixOS module by looking at app.service to get understanding how the app should run.
If I want to package an app that has systemd files, should I:
Move the systemd files to $out and then just add some minimal configuration like in the Syncthing NixOS module.
move the unit file(s) into $out/lib/systemd/system (or user)
patch the binary paths
What is the minimal config. in this case?
{
systemd.packages = [ pkgs.your-package]; # this pulls in the .service file
systemd.services = {
your-unit.wantedBy = [ "multi-user.target"]; # this makes it run
};
}