diff options
Diffstat (limited to 'nixpkgs/nixos/modules/services/backup/borgmatic.nix')
-rw-r--r-- | nixpkgs/nixos/modules/services/backup/borgmatic.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nixpkgs/nixos/modules/services/backup/borgmatic.nix b/nixpkgs/nixos/modules/services/backup/borgmatic.nix index 5e5c0bbeccca..7236a1f19411 100644 --- a/nixpkgs/nixos/modules/services/backup/borgmatic.nix +++ b/nixpkgs/nixos/modules/services/backup/borgmatic.nix @@ -4,21 +4,22 @@ with lib; let cfg = config.services.borgmatic; - cfgfile = pkgs.writeText "config.yaml" (builtins.toJSON cfg.settings); + settingsFormat = pkgs.formats.yaml { }; + cfgfile = settingsFormat.generate "config.yaml" cfg.settings; in { options.services.borgmatic = { enable = mkEnableOption "borgmatic"; settings = mkOption { - description = '' + description = lib.mdDoc '' See https://torsion.org/borgmatic/docs/reference/configuration/ ''; type = types.submodule { - freeformType = with lib.types; attrsOf anything; + freeformType = settingsFormat.type; options.location = { source_directories = mkOption { type = types.listOf types.str; - description = '' + description = lib.mdDoc '' List of source directories to backup (required). Globs and tildes are expanded. ''; @@ -26,7 +27,7 @@ in { }; repositories = mkOption { type = types.listOf types.str; - description = '' + description = lib.mdDoc '' Paths to local or remote repositories (required). Tildes are expanded. Multiple repositories are backed up to in sequence. Borg placeholders can be used. See the output of |