launchd change logfile paths

This commit is contained in:
willemml 2023-04-11 00:45:49 -07:00
parent 4117b02b8d
commit 62e9af71b8
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD

View file

@ -3,7 +3,9 @@
config, config,
pkgs, pkgs,
... ...
}: { }: let
logFile = name: "${config.home.homeDirectory}/Library/Logs/${name}.log";
in {
launchd = { launchd = {
enable = true; enable = true;
@ -16,19 +18,8 @@
]; ];
KeepAlive = true; KeepAlive = true;
ProcessType = "Interactive"; ProcessType = "Interactive";
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/emacs-stdout.log"; StandardOutPath = logFile "emacs";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/emacs-stderr.log"; StandardErrorPath = logFile "emacs";
};
};
agents.iterm2 = {
enable = true;
config = {
ProgramArguments = ["${pkgs.iterm2}/Applications/iTerm2.app/Contents/MacOS/iTerm2"];
KeepAlive = true;
ProcessType = "Interactive";
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/iterm2-stdout.log";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/iterm2-stderr.log";
}; };
}; };
@ -38,8 +29,19 @@
ProgramArguments = ["${config.programs.firefox.package}/bin/firefox"]; ProgramArguments = ["${config.programs.firefox.package}/bin/firefox"];
KeepAlive = true; KeepAlive = true;
ProcessType = "Interactive"; ProcessType = "Interactive";
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/firefox-stdout.log"; StandardOutPath = logFile "firefox";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/firefox-stderr.log"; StandardErrorPath = logFile "firefox";
};
};
agents.iterm2 = {
enable = true;
config = {
ProgramArguments = ["${pkgs.iterm2}/Applications/iTerm2.app/Contents/MacOS/iTerm2"];
KeepAlive = true;
ProcessType = "Interactive";
StandardOutPath = logFile "iterm2";
StandardErrorPath = logFile "iterm2";
}; };
}; };
@ -49,8 +51,8 @@
ProgramArguments = ["${pkgs.offlineimap}/bin/offlineimap"]; ProgramArguments = ["${pkgs.offlineimap}/bin/offlineimap"];
UserName = "${config.home.username}"; UserName = "${config.home.username}";
StartInterval = 900; StartInterval = 900;
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/offlineimap-stdout.log"; StandardOutPath = logFile "offlineimap";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/offlineimap-stderr.log"; StandardErrorPath = logFile "offlineimap";
}; };
}; };
@ -62,8 +64,8 @@
"run" "run"
]; ];
StartInterval = 3600; StartInterval = 3600;
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/rss2email-stdout.log"; StandardOutPath = logFile "rss2email";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/rss2email-stderr.log"; StandardErrorPath = logFile "rss2email";
}; };
}; };
}; };