24 lines
435 B
Nix
24 lines
435 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
systemd.services.msjd = {
|
|
description = "Msjd";
|
|
after = [ "network.target" ];
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
serviceConfig = {
|
|
WorkingDirectory = "/home/me/main/msjd";
|
|
ExecStart = "${pkgs.nodejs}/bin/node index.mjs";
|
|
|
|
User = "me";
|
|
Restart = "always";
|
|
RestartSec = 3;
|
|
|
|
Environment = [
|
|
"NODE_ENV=production"
|
|
"PORT=3709"
|
|
];
|
|
};
|
|
};
|
|
}
|