mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 02:39:48 +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:
parent
263f6e4523
commit
e412025fff
2 changed files with 8 additions and 2 deletions
|
@ -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.";
|
||||
};
|
||||
|
|
|
@ -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]="${
|
||||
|
|
Loading…
Reference in a new issue