Use msjd as flake
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
msjd = builtins.getFlake "${config.users.users."me".home}/main/msjd";
|
||||
in
|
||||
{
|
||||
systemd.services.msjd = {
|
||||
description = "Msjd";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
WorkingDirectory = msjd.packages.x86_64-linux.default;
|
||||
ExecStart = "${pkgs.nodejs}/bin/node ${msjd.packages.x86_64-linux.default}/index.mjs";
|
||||
|
||||
User = "me";
|
||||
Restart = "always";
|
||||
RestartSec = 3;
|
||||
|
||||
Environment = [
|
||||
"NODE_ENV=production"
|
||||
"PORT=3709"
|
||||
];
|
||||
|
||||
EnvironmentFile = "/run/secrets.env";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user