diff options
Diffstat (limited to 'nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/restic.nix')
-rw-r--r-- | nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/restic.nix | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/restic.nix b/nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/restic.nix index 12962af5f111..ef44803ba053 100644 --- a/nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/restic.nix +++ b/nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/restic.nix @@ -1,16 +1,25 @@ { config, lib, pkgs, options, ... }: -with lib; - let cfg = config.services.prometheus.exporters.restic; + inherit (lib) + mkOption + types + concatStringsSep + mkIf + mapAttrs' + splitString + toUpper + optionalAttrs + nameValuePair + ; in { port = 9753; extraOpts = { repository = mkOption { type = types.str; - description = lib.mdDoc '' + description = '' URI pointing to the repository to monitor. ''; example = "sftp:backup@192.168.1.100:/backups/example"; @@ -18,7 +27,7 @@ in passwordFile = mkOption { type = types.path; - description = lib.mdDoc '' + description = '' File containing the password to the repository. ''; example = "/etc/nixos/restic-password"; @@ -27,7 +36,7 @@ in environmentFile = mkOption { type = with types; nullOr path; default = null; - description = lib.mdDoc '' + description = '' File containing the credentials to access the repository, in the format of an EnvironmentFile as described by systemd.exec(5) ''; @@ -36,7 +45,7 @@ in refreshInterval = mkOption { type = types.ints.unsigned; default = 60; - description = lib.mdDoc '' + description = '' Refresh interval for the metrics in seconds. Computing the metrics is an expensive task, keep this value as high as possible. ''; @@ -45,7 +54,7 @@ in rcloneOptions = mkOption { type = with types; attrsOf (oneOf [ str bool ]); default = { }; - description = lib.mdDoc '' + description = '' Options to pass to rclone to control its behavior. See <https://rclone.org/docs/#options> for available options. When specifying option names, strip the @@ -58,7 +67,7 @@ in rcloneConfig = mkOption { type = with types; attrsOf (oneOf [ str bool ]); default = { }; - description = lib.mdDoc '' + description = '' Configuration for the rclone remote being used for backup. See the remote's specific options under rclone's docs at <https://rclone.org/docs/>. When specifying @@ -79,7 +88,7 @@ in rcloneConfigFile = mkOption { type = with types; nullOr path; default = null; - description = lib.mdDoc '' + description = '' Path to the file containing rclone configuration. This file must contain configuration for the remote specified in this backup set and also must be readable by root. |