1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 18:59:47 +01:00

borgmatic: allow lists in extraConfig

In particular, we should be able to specify `exclude_backups` in our
configuration.

Fixes #3489
This commit is contained in:
Matt Bryant 2022-12-12 21:50:23 -08:00 committed by Robert Helgesson
parent 263f6e4523
commit e412025fff
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 8 additions and 2 deletions

View file

@ -20,7 +20,7 @@ let
};
extraConfigOption = mkOption {
type = with types; attrsOf (oneOf [ str bool path int ]);
type = with types; attrsOf (oneOf [ str bool path int (listOf str) ]);
default = { };
description = "Extra settings.";
};

View file

@ -12,7 +12,10 @@ in {
location = {
sourceDirectories = [ "/my-stuff-to-backup" ];
repositories = [ "/mnt/disk1" "/mnt/disk2" ];
extraConfig = { one_file_system = true; };
extraConfig = {
one_file_system = true;
exclude_patterns = [ "*.swp" ];
};
};
storage = {
@ -64,6 +67,9 @@ in {
expectations[location.one_file_system]="${
boolToString backups.main.location.extraConfig.one_file_system
}"
expectations[location.exclude_patterns[0]]="${
builtins.elemAt backups.main.location.extraConfig.exclude_patterns 0
}"
expectations[storage.encryption_passcommand]="${backups.main.storage.encryptionPasscommand}"
expectations[storage.checkpoint_interval]="${