From c0435e694de19f8adad46fc5d0790d73406da3c2 Mon Sep 17 00:00:00 2001 From: sinavir Date: Fri, 18 Oct 2024 11:47:55 +0200 Subject: [PATCH] fix(modules/dgn-records): Add enable option --- modules/dgn-records/default.nix | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/modules/dgn-records/default.nix b/modules/dgn-records/default.nix index a6e77c8..5fed75a 100644 --- a/modules/dgn-records/default.nix +++ b/modules/dgn-records/default.nix @@ -1,13 +1,25 @@ -{ config, ... }: +{ config, lib, ... }: + +let + inherit (lib) mkEnableOption mkIf; + + cfg = config.dgn-records; +in { - services.arkheon.record = { - enable = true; - - tokenFile = config.age.secrets."__arkheon-token_file".path; - - url = "https://arkheon.dgnum.eu"; + options.dgn-records.enable = mkEnableOption "Arkheon deployment recording." // { + default = true; }; - age-secrets.sources = [ ./. ]; + config = mkIf cfg.enable { + services.arkheon.record = { + enable = true; + + tokenFile = config.age.secrets."__arkheon-token_file".path; + + url = "https://arkheon.dgnum.eu"; + }; + + age-secrets.sources = [ ./. ]; + }; }