Skip to content

Commit 39a6d55

Browse files
committed
atuin: refactor logpaths
1 parent 72c8e99 commit 39a6d55

1 file changed

Lines changed: 4 additions & 16 deletions

File tree

modules/home/programs/terminal/tools/atuin/default.nix

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
config,
33
lib,
4-
osConfig,
4+
osConfig ? { },
55
pkgs,
66
...
77
}:
@@ -10,18 +10,6 @@ let
1010

1111
cfg = config.khanelinix.programs.terminal.tools.atuin;
1212

13-
# Get log paths from Darwin system config if available, otherwise use defaults
14-
logPaths =
15-
if
16-
pkgs.stdenv.hostPlatform.isDarwin
17-
&& (osConfig.khanelinix.programs.terminal.tools.atuin.enable or false)
18-
then
19-
osConfig.khanelinix.programs.terminal.tools.atuin.logPaths
20-
else
21-
{
22-
stdout = "${config.home.homeDirectory}/Library/Logs/atuin/atuin.out.log";
23-
stderr = "${config.home.homeDirectory}/Library/Logs/atuin/atuin.err.log";
24-
};
2513
in
2614
{
2715
options.khanelinix.programs.terminal.tools.atuin = {
@@ -30,9 +18,9 @@ in
3018
};
3119

3220
config = mkIf cfg.enable {
33-
launchd.agents.atuin-daemon.config = {
34-
StandardErrorPath = logPaths.stderr;
35-
StandardOutPath = logPaths.stdout;
21+
launchd.agents.atuin-daemon.config = lib.mkIf pkgs.stdenv.hostPlatform.isDarwin {
22+
StandardErrorPath = osConfig.khanelinix.programs.terminal.tools.atuin.logPaths.stderr;
23+
StandardOutPath = osConfig.khanelinix.programs.terminal.tools.atuin.logPaths.stdout;
3624
};
3725

3826
programs.atuin = {

0 commit comments

Comments
 (0)