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

nixos/osquery: Update tests with option changes

+7 -7
+6 -6
nixos/modules/services/monitoring/osquery.nix
··· 63 63 freeformType = attrsOf str; 64 64 options = { 65 65 database_path = lib.mkOption { 66 - default = "/var/lib/osquery/osquery.db"; 66 + default = "osquery/osquery.db"; 67 67 readOnly = true; 68 - description = "Path used for the database file."; 69 - type = path; 68 + description = "Path used for the database file, relative to /var/lib/."; 69 + type = nonEmptyStr; 70 70 }; 71 71 logger_path = lib.mkOption { 72 - default = "/var/log/osquery"; 72 + default = "osquery"; 73 73 readOnly = true; 74 - description = "Base directory used for logging."; 75 - type = path; 74 + description = "Base directory used for logging, relative to /var/log/."; 75 + type = nonEmptyStr; 76 76 }; 77 77 pidfile = lib.mkOption { 78 78 default = "/run/osquery/osqueryd.pid";
+1 -1
nixos/tests/osquery.nix
··· 53 53 machine.succeed("echo 'SELECT value FROM osquery_flags WHERE name = \"nullvalue\";' | osqueryi | tee /dev/console | grep -q ${nullvalue}") 54 54 55 55 # Module creates directories for default database_path and pidfile flag values. 56 - machine.succeed("test -d $(dirname ${cfg.flags.database_path})") 56 + machine.succeed("test -d $(dirname /var/lib/${cfg.flags.database_path})") 57 57 machine.succeed("test -d $(dirname ${cfg.flags.pidfile})") 58 58 ''; 59 59 }