diff --git a/modules/programs/borgmatic.nix b/modules/programs/borgmatic.nix index 75bb2b8e5..5e84edbe6 100644 --- a/modules/programs/borgmatic.nix +++ b/modules/programs/borgmatic.nix @@ -134,6 +134,10 @@ let extraConfig = extraConfigOption; }; + + output = { extraConfig = extraConfigOption; }; + + hooks = { extraConfig = extraConfigOption; }; }; }); @@ -168,6 +172,8 @@ let } // config.retention.extraConfig; consistency = removeNullValues { checks = config.consistency.checks; } // config.consistency.extraConfig; + output = config.output.extraConfig; + hooks = config.hooks.extraConfig; }; in { meta.maintainers = [ maintainers.DamienCassou ]; diff --git a/tests/modules/programs/borgmatic/basic-configuration.nix b/tests/modules/programs/borgmatic/basic-configuration.nix index f27b84b80..50b4a0f2a 100644 --- a/tests/modules/programs/borgmatic/basic-configuration.nix +++ b/tests/modules/programs/borgmatic/basic-configuration.nix @@ -44,6 +44,12 @@ in { extraConfig = { prefix = "hostname"; }; }; + + output = { extraConfig = { color = false; }; }; + + hooks = { + extraConfig = { before_actions = [ "echo Starting actions." ]; }; + }; }; }; }; @@ -96,6 +102,12 @@ in { (builtins.elemAt backups.main.consistency.checks 1).frequency }" expectations[consistency.prefix]="${backups.main.consistency.extraConfig.prefix}" + expectations[output.color]="${ + boolToString backups.main.output.extraConfig.color + }" + expectations[hooks.before_actions[0]]="${ + builtins.elemAt backups.main.hooks.extraConfig.before_actions 0 + }" yq=${pkgs.yq-go}/bin/yq