From 5083c75163079244ab2f3f4eca1c9d514c2bbf03 Mon Sep 17 00:00:00 2001 From: Mel Date: Thu, 19 Dec 2024 21:04:44 +0100 Subject: Foundation module for monitoring options Signed-off-by: Mel --- services/monitoring/wrapper.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 services/monitoring/wrapper.nix (limited to 'services/monitoring') diff --git a/services/monitoring/wrapper.nix b/services/monitoring/wrapper.nix new file mode 100644 index 0000000..416ae22 --- /dev/null +++ b/services/monitoring/wrapper.nix @@ -0,0 +1,15 @@ +# This wraps the monitoring service module to allow it to be +# imported conditionally. +{ lib, pkgs, auxiliaryPkgs, config, ... }: + +let + enabled = config.foundation.internal.monitoringService; + module = import ./.; +in +{ + options.foundation.internal = { + monitoringService = lib.mkEnableOption "monitoring service"; + }; + + config = lib.mkIf enabled (module { inherit lib pkgs auxiliaryPkgs; }); +} -- cgit 1.4.1