Add some clauses to systemd

This commit is contained in:
niten 2023-01-06 14:59:27 -08:00
parent e240b33b77
commit a7aadef0c4
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.services.objectifier = { systemd.services.objectifier = {
after = [ "network-online.target" ]; after = [ "network-online.target" ];
wantedBy = [ "default.target" ]; wantedBy = [ "multi-user.target" ];
reloadIfChanged = true; reloadIfChanged = true;
path = with pkgs; [ pythonYolo ]; path = with pkgs; [ pythonYolo ];
environment = { environment = {
@ -68,7 +68,9 @@ in {
# LockPersonality = true; # LockPersonality = true;
# PermissionsStartOnly = true; # PermissionsStartOnly = true;
WorkingDirectory = "${pkgs.objectifier}"; WorkingDirectory = "${pkgs.objectifier}";
LimitNOFILE = 4096;
Restart = "on-failure"; Restart = "on-failure";
RestartSec = "5s";
Type = "simple"; Type = "simple";
PIDFile = "/run/objectifier.pid"; PIDFile = "/run/objectifier.pid";
ExecStart = let ExecStart = let