Skip to content

Commit

Permalink
fix: change pm2 service style for home manager
Browse files Browse the repository at this point in the history
  • Loading branch information
yunfachi committed Nov 10, 2023
1 parent 0ab4c3b commit c56ed4f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions home/server/pm2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
nodePackages_latest.pm2
];

systemd.services.pm2 = {
enable = true;
description = "pm2";
unitConfig = {
Type = "simple";
};
wantedBy = ["multi-user.target"];
serviceConfig = {
systemd.user.services."pm2" = {
Unit.Description = "pm2";
Unit.Type = "simple";
Install.WantedBy = ["multi-user.target"];
Service = {
ExecStart = "${pkgs.nodePackages_latest.pm2}/bin/pm2 resurrect";
ExecReload = "${pkgs.nodePackages_latest.pm2}/bin/pm2 reload all";
ExecStop = "${pkgs.nodePackages_latest.pm2}/bin/pm2 kill";
Expand Down

0 comments on commit c56ed4f

Please sign in to comment.