diff --git a/nix/base-system/modules/darwin-monitor.nix b/nix/base-system/modules/darwin-monitor.nix index b095c67..bbdec9f 100644 --- a/nix/base-system/modules/darwin-monitor.nix +++ b/nix/base-system/modules/darwin-monitor.nix @@ -126,6 +126,8 @@ with lib; WatchPaths = [ "/etc/${config.environment.etc."heracles.yaml".target}" ]; + StandardOutPath = "/var/log/heracles.log"; + StandardErrorPath = "/var/log/heracles.err.log"; KeepAlive = true; RunAtLoad = true; }; @@ -139,8 +141,8 @@ with lib; ]; KeepAlive = true; - #StandardOutPath = "/var/log/durnitisp.log"; - #StandardErrorPath = "var/log/durnitisp.err.log"; + StandardOutPath = "/var/log/durnitisp.log"; + StandardErrorPath = "/var/log/durnitisp.err.log"; RunAtLoad = true; }; }; @@ -163,7 +165,28 @@ with lib; RunAtLoad = true; }; }; + + environment.etc."newsyslog.d/org.nixos.prometheus.conf" = mkIf config.services.prometheus.enable { + text = '' + # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] + ${config.launchd.user.agents.prometheus.serviceConfig.StandardOutPath} 644 10 1000 * NJ + ${config.launchd.user.agents.prometheus.serviceConfig.StandardErrorPath} 644 10 1000 * NJ + ''; + }; + environment.etc."newsyslog.d/org.nixos.heracles.conf" = mkIf config.services.prometheus.enable { + text = '' + # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] + ${config.launchd.user.agents.heracles.serviceConfig.StandardOutPath} 644 10 1000 * NJ + ${config.launchd.user.agents.heracles.serviceConfig.StandardErrorPath} 644 10 1000 * NJ + ''; + }; + environment.etc."newsyslog.d/org.nixos.durnitisp.conf" = mkIf config.services.durnitisp.enable { + text = '' + # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] + ${config.launchd.daemons.durnitisp.serviceConfig.StandardOutPath} 644 10 1000 * NJ + ${config.launchd.daemons.durnitisp.serviceConfig.StandardErrorPath} 644 10 1000 * NJ + ''; + }; }; - }