diff --git a/home/server/pm2.nix b/home/server/pm2.nix index c884510..4acc9ce 100644 --- a/home/server/pm2.nix +++ b/home/server/pm2.nix @@ -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";