mirror of
https://github.com/nix-community/home-manager
synced 2024-12-21 02:23:16 +00:00
16311f1d3c
Borgmatic has support for Borg's pattern matching. It is mutually exclusive with the existing `sourceDirectories` option, so assertions have been added to make sure that both are not set at the same time (but also that at least one of them is). Additionally, tests have been added to test the following configurations: `patterns` instead of `sourceDirectories`, both at the same time, and neither.
18 lines
408 B
Nix
18 lines
408 B
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
|
|
backups = config.programs.borgmatic.backups;
|
|
|
|
in {
|
|
programs.borgmatic = {
|
|
enable = true;
|
|
backups = { main = { location = { repositories = [ "/mnt/disk1" ]; }; }; };
|
|
};
|
|
|
|
test.stubs.borgmatic = { };
|
|
|
|
test.asserts.assertions.expected = [''
|
|
Borgmatic backup configuration "main" must specify one of 'location.sourceDirectories' or 'location.patterns'.
|
|
''];
|
|
}
|