aboutsummaryrefslogtreecommitdiff
path: root/modules/private/monitoring/default.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-12 00:24:23 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-12-20 04:12:27 +0100
commitab8f306d7c2c49b8116e1af7b355ed2384617ed9 (patch)
treed1061ec0436fd096de2332a892eb984c63cb125e /modules/private/monitoring/default.nix
parent4227853a03923e04daf3dd511a4b5a1ab5d527e7 (diff)
downloadNix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.tar.gz
Nix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.tar.zst
Nix-ab8f306d7c2c49b8116e1af7b355ed2384617ed9.zip
Add specification for the private config file as a module.
Diffstat (limited to 'modules/private/monitoring/default.nix')
-rw-r--r--modules/private/monitoring/default.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/private/monitoring/default.nix b/modules/private/monitoring/default.nix
index e44b127..d6c91ac 100644
--- a/modules/private/monitoring/default.nix
+++ b/modules/private/monitoring/default.nix
@@ -1,4 +1,4 @@
1{ config, myconfig, pkgs, lib, name, hostFQDN, ... }: 1{ config, pkgs, lib, name, ... }:
2let 2let
3 myplugins = pkgs.runCommand "buildplugins" { 3 myplugins = pkgs.runCommand "buildplugins" {
4 buildInputs = [ pkgs.makeWrapper pkgs.perl ]; 4 buildInputs = [ pkgs.makeWrapper pkgs.perl ];
@@ -38,7 +38,7 @@ let
38 }; 38 };
39 }; 39 };
40 commonObjects = pkgs.callPackage ./objects_common.nix ({ 40 commonObjects = pkgs.callPackage ./objects_common.nix ({
41 inherit hostFQDN; 41 hostFQDN = config.hostEnv.FQDN;
42 sudo = "/run/wrappers/bin/sudo"; 42 sudo = "/run/wrappers/bin/sudo";
43 } // builtins.getAttr name commonConfig); 43 } // builtins.getAttr name commonConfig);
44 hostObjects = 44 hostObjects =
@@ -113,7 +113,7 @@ in
113 enable = true; 113 enable = true;
114 mode = "0644"; 114 mode = "0644";
115 user = "root"; 115 user = "root";
116 text = "MAILADDR ${myconfig.env.monitoring.email}"; 116 text = "MAILADDR ${config.myEnv.monitoring.email}";
117 }; 117 };
118 118
119 # needed since extraResource is not in the closure 119 # needed since extraResource is not in the closure
@@ -125,15 +125,15 @@ in
125 use_syslog=1 125 use_syslog=1
126 log_initial_states=1 126 log_initial_states=1
127 date_format=iso8601 127 date_format=iso8601
128 admin_email=${myconfig.env.monitoring.email} 128 admin_email=${config.myEnv.monitoring.email}
129 129
130 obsess_over_services=1 130 obsess_over_services=1
131 ocsp_command=notify-master 131 ocsp_command=notify-master
132 ''; 132 '';
133 extraResource = '' 133 extraResource = ''
134 $USER2$=${myplugins} 134 $USER2$=${myplugins}
135 $USER200$=${myconfig.env.monitoring.status_url} 135 $USER200$=${config.myEnv.monitoring.status_url}
136 $USER201$=${myconfig.env.monitoring.status_token} 136 $USER201$=${config.myEnv.monitoring.status_token}
137 ''; 137 '';
138 objectDefs = toObjects commonObjects + toObjects hostObjects; 138 objectDefs = toObjects commonObjects + toObjects hostObjects;
139 }; 139 };