From a7aadef0c4393fa7b7633d99142b5531580cec5c Mon Sep 17 00:00:00 2001 From: niten Date: Fri, 6 Jan 2023 14:59:27 -0800 Subject: [PATCH] Add some clauses to systemd --- objectifier-module.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/objectifier-module.nix b/objectifier-module.nix index 7729adc..c1d18df 100644 --- a/objectifier-module.nix +++ b/objectifier-module.nix @@ -40,7 +40,7 @@ in { config = mkIf cfg.enable { systemd.services.objectifier = { after = [ "network-online.target" ]; - wantedBy = [ "default.target" ]; + wantedBy = [ "multi-user.target" ]; reloadIfChanged = true; path = with pkgs; [ pythonYolo ]; environment = { @@ -68,7 +68,9 @@ in { # LockPersonality = true; # PermissionsStartOnly = true; WorkingDirectory = "${pkgs.objectifier}"; + LimitNOFILE = 4096; Restart = "on-failure"; + RestartSec = "5s"; Type = "simple"; PIDFile = "/run/objectifier.pid"; ExecStart = let