nixos/osquery: fix database_path + logger_path opts per systemd docs

nixos/osquery: Update tests with option changes
This commit is contained in:
bstanderline
2025-01-01 15:46:11 +00:00
parent c11d274cd1
commit 29b42bd731
2 changed files with 7 additions and 7 deletions

View File

@@ -63,16 +63,16 @@ in
freeformType = attrsOf str; freeformType = attrsOf str;
options = { options = {
database_path = lib.mkOption { database_path = lib.mkOption {
default = "/var/lib/osquery/osquery.db"; default = "osquery/osquery.db";
readOnly = true; readOnly = true;
description = "Path used for the database file."; description = "Path used for the database file, relative to /var/lib/.";
type = path; type = nonEmptyStr;
}; };
logger_path = lib.mkOption { logger_path = lib.mkOption {
default = "/var/log/osquery"; default = "osquery";
readOnly = true; readOnly = true;
description = "Base directory used for logging."; description = "Base directory used for logging, relative to /var/log/.";
type = path; type = nonEmptyStr;
}; };
pidfile = lib.mkOption { pidfile = lib.mkOption {
default = "/run/osquery/osqueryd.pid"; default = "/run/osquery/osqueryd.pid";

View File

@@ -53,7 +53,7 @@ import ./make-test-python.nix (
machine.succeed("echo 'SELECT value FROM osquery_flags WHERE name = \"nullvalue\";' | osqueryi | tee /dev/console | grep -q ${nullvalue}") machine.succeed("echo 'SELECT value FROM osquery_flags WHERE name = \"nullvalue\";' | osqueryi | tee /dev/console | grep -q ${nullvalue}")
# Module creates directories for default database_path and pidfile flag values. # Module creates directories for default database_path and pidfile flag values.
machine.succeed("test -d $(dirname ${cfg.flags.database_path})") machine.succeed("test -d $(dirname /var/lib/${cfg.flags.database_path})")
machine.succeed("test -d $(dirname ${cfg.flags.pidfile})") machine.succeed("test -d $(dirname ${cfg.flags.pidfile})")
''; '';
} }