I am trying to write a systemd service for postgrest like this
systemd.services = {
postgrest = {
enable = true;
description = "Start postgrest";
after = [ "container@testproddb.service" ];
serviceConfig = {
User = "postgrest";
Restart = "always";
ExecStart = "${let unstable = import <nixos-unstable> {}; in with pkgs; unstable.haskellPackages.postgrest}/bin/postgrest /etc/nixos/config/postgrest.conf";
};
};
};
I have to run unstable for that package because its broken in 23.11.
When i look at the output .service file it points to a .postgrest directory in the store but not the .postgrest-bin directory.
Am i doing something dumb?