mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-31 04:04:45 +00:00
services/netdata: add cacheDir option
For me netdata could not start: ```logs time=2025-03-18T21:27:21.023+02:00 comm=netdata source=daemon level=info errno="2, No such file or directory" tid=257369 msg="CONFIG: cannot load cloud config '/var/lib/netdata/cloud.d/cloud.conf'. Running with internal defaults." time=2025-03-18T21:27:21.024+02:00 comm=netdata source=daemon level=alert errno="2, No such file or directory" tid=257369 msg="Cannot create required directory '/var/cache/netdata'" 0 netdata 0x0000000104845cb0 netdata_logger_fatal + 356 1 netdata 0x00000001044d8734 verify_or_create_required_directory + 84 2 netdata 0x00000001044d718c set_global_environment + 524 3 netdata 0x00000001044db294 netdata_main + 1920 4 netdata 0x00000001044dd178 main + 12 5 dyld 0x0000000184394274 start + 2840 ```
This commit is contained in:
parent
95eac71bf5
commit
5417dfd58c
1 changed files with 7 additions and 0 deletions
|
@ -29,6 +29,12 @@ in {
|
|||
default = "/var/log/netdata";
|
||||
description = "Log directory for Netdata";
|
||||
};
|
||||
|
||||
cacheDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/cache/netdata";
|
||||
description = "Cache directory for Netdata";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -50,6 +56,7 @@ in {
|
|||
|
||||
system.activationScripts.preActivation.text = ''
|
||||
mkdir -p ${cfg.workDir}
|
||||
mkdir -p ${cfg.cacheDir}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue