Files
dotfiles/modules/msjd/default.nix
T
2026-07-08 22:12:54 +01:00

29 lines
541 B
Nix

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