File tree Expand file tree Collapse file tree
modules/services/monitoring Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 ( { config_path = conf ; } // cfg . flags )
2626 )
2727 ) ;
28-
28+ osquery = cfg . package ;
2929 osqueryi = pkgs . runCommand "osqueryi" { nativeBuildInputs = [ pkgs . makeWrapper ] ; } ''
3030 mkdir -p $out/bin
31- makeWrapper ${ pkgs . osquery } /bin/osqueryi $out/bin/osqueryi \
31+ makeWrapper ${ osquery } /bin/osqueryi $out/bin/osqueryi \
3232 --add-flags "--flagfile ${ flagfile } --disable-database"
3333 '' ;
34+
3435in
3536{
3637 options . services . osquery = {
3738 enable = lib . mkEnableOption "osqueryd daemon" ;
3839
40+ package = lib . mkPackageOption pkgs "osquery" { } ;
41+
3942 settings = lib . mkOption {
4043 default = { } ;
4144 description = ''
108111 ] ;
109112 description = "The osquery daemon" ;
110113 serviceConfig = {
111- ExecStart = "${ pkgs . osquery } /bin/osqueryd --flagfile ${ flagfile } " ;
114+ ExecStart = "${ osquery } /bin/osqueryd --flagfile ${ flagfile } " ;
112115 PIDFile = cfg . flags . pidfile ;
113116 LogsDirectory = lib . mkIf ( cfg . flags . logger_path == "/var/log/osquery" ) [ "osquery" ] ;
114117 StateDirectory = lib . mkIf ( cfg . flags . database_path == "/var/lib/osquery/osquery.db" ) [ "osquery" ] ;
115118 Restart = "always" ;
116119 } ;
117120 wantedBy = [ "multi-user.target" ] ;
118121 } ;
119- systemd . tmpfiles . settings . "10-osquery" . ${ dirname ( cfg . flags . pidfile ) } . d = {
122+ systemd . tmpfiles . settings . "10-osquery" . ${ dirname cfg . flags . pidfile } . d = {
120123 user = "root" ;
121124 group = "root" ;
122125 mode = "0755" ;
Original file line number Diff line number Diff line change 11import ./make-test-python.nix (
2- { lib , pkgs , ... } :
2+ { lib , ... } :
33
44 let
55 config_refresh = "10" ;
@@ -13,19 +13,17 @@ import ./make-test-python.nix (
1313 lewo
1414 ] ;
1515
16- nodes . machine =
17- { config , pkgs , ... } :
18- {
19- services . osquery = {
20- enable = true ;
21-
22- settings . options = { inherit nullvalue utc ; } ;
23- flags = {
24- inherit config_refresh ;
25- nullvalue = "IGNORED" ;
26- } ;
16+ nodes . machine = _ : {
17+ services . osquery = {
18+ enable = true ;
19+
20+ settings . options = { inherit nullvalue utc ; } ;
21+ flags = {
22+ inherit config_refresh ;
23+ nullvalue = "IGNORED" ;
2724 } ;
2825 } ;
26+ } ;
2927
3028 testScript =
3129 { nodes , ... } :
You can’t perform that action at this time.
0 commit comments