summaryrefslogtreecommitdiffstats
path: root/nixos/tests/borgmatic.nix
blob: e89e2b05e4ef734b87a434a119d14846bbecd327 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ pkgs, ... }:
{
  name = "borgmatic";
  nodes.machine =
    { ... }:
    {
      services.borgmatic = {
        enable = true;
        settings = {
          source_directories = [ "/home" ];
          repositories = [
            {
              label = "local";
              path = "/var/backup";
            }
          ];
          keep_daily = 7;
        };
      };
    };

  testScript = ''
    machine.succeed("borgmatic rcreate -e none")
    machine.succeed("borgmatic")
  '';
}