Files
dotfiles/modules/msjd.nix
T
2026-07-07 09:25:07 +01:00

29 lines
543 B
Nix

{ config, pkgs, ... }:
let
projectDir ="${config.users.users."me".home}/main/msjd";
in
{
systemd.services.msjd = {
description = "Msjd";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
WorkingDirectory = projectDir;
ExecStart = "${pkgs.nodejs}/bin/node index.mjs";
User = "me";
Restart = "always";
RestartSec = 3;
Environment = [
"NODE_ENV=production"
"PORT=3709"
];
};
ConditionPathIsDirectory = projectDir;
};
}