From 857e0584d19e0abbc9f73a7ea9aea24be6a6786e Mon Sep 17 00:00:00 2001 From: hyperion Date: Fri, 30 Oct 2020 12:00:11 +0100 Subject: Refactoring repository structure and building basic nix module --- nix/metrics.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 nix/metrics.nix (limited to 'nix/metrics.nix') 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 { + + }; +} -- cgit v1.2.3