summaryrefslogtreecommitdiff
path: root/nix/metrics.nix
diff options
context:
space:
mode:
authorhyperion <hyperion@spacekookie.de>2020-10-30 12:00:11 +0100
committerhyperion <hyperion@spacekookie.de>2020-10-30 12:00:11 +0100
commit857e0584d19e0abbc9f73a7ea9aea24be6a6786e (patch)
tree2ffbd6a261b00b6adfb148d458c6185a0ddf59a9 /nix/metrics.nix
parent43fc40d5dc18615aab9b99f940de59a8da20a902 (diff)
Refactoring repository structure and building basic nix module
Diffstat (limited to 'nix/metrics.nix')
-rw-r--r--nix/metrics.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nix/metrics.nix b/nix/metrics.nix
new file mode 100644
index 0000000..8dfc881
--- /dev/null
+++ b/nix/metrics.nix
@@ -0,0 +1,30 @@
+{ lib, config, ... }:
+
+with lib;
+let
+ cfg = config.services.brook;
+in
+{
+ options.services.brook.metrics = {
+ enable = mkEnableOption "brook-web metrics backend";
+
+ port = mkOption {
+ type = types.int;
+ description = ''
+ Port to bind the brook-metrics backend server to.
+ '';
+ };
+
+ path = mkOption {
+ type = types.str;
+ description = ''
+ Set the BROOK_METRICS_PATH environment variable to let
+ brook-metrics know where to export the csv output to.
+ '';
+ };
+ };
+
+ config = mkIf cfg.enable {
+
+ };
+}