Skip to content

Commit 9446650

Browse files
committed
skhd: refactor logpaths
1 parent 39a6d55 commit 9446650

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

modules/darwin/services/skhd/default.nix

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,35 @@ in
1111
options.khanelinix.services.skhd = {
1212
enable = lib.mkEnableOption "skhd log rotation";
1313

14-
logPath = mkOption {
15-
type = types.str;
16-
default = "${userHome}/Library/Logs/skhd.log";
17-
description = "Path to skhd log file";
14+
logPaths = {
15+
stdout = mkOption {
16+
type = types.str;
17+
default = "${userHome}/Library/Logs/skhd/skhd.out.log";
18+
description = "Path to skhd stdout log file";
19+
};
20+
21+
stderr = mkOption {
22+
type = types.str;
23+
default = "${userHome}/Library/Logs/skhd/skhd.err.log";
24+
description = "Path to skhd stderr log file";
25+
};
1826
};
1927
};
2028

2129
config = mkIf cfg.enable {
2230
system.newsyslog.files.skhd = [
2331
{
24-
logfilename = cfg.logPath;
32+
logfilename = cfg.logPaths.stdout;
33+
mode = "644";
34+
count = 7;
35+
size = "1M";
36+
flags = [
37+
"Z"
38+
"C"
39+
];
40+
}
41+
{
42+
logfilename = cfg.logPaths.stderr;
2543
mode = "644";
2644
count = 7;
2745
size = "1M";

0 commit comments

Comments
 (0)