diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8193c3dfe840..39e95609ddfe 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -154,6 +154,7 @@ in { bootspec = handleTestOn ["x86_64-linux"] ./bootspec.nix {}; boot-stage1 = handleTest ./boot-stage1.nix {}; borgbackup = handleTest ./borgbackup.nix {}; + borgmatic = handleTest ./borgmatic.nix {}; botamusique = handleTest ./botamusique.nix {}; bpf = handleTestOn ["x86_64-linux" "aarch64-linux"] ./bpf.nix {}; bpftune = handleTest ./bpftune.nix {}; diff --git a/nixos/tests/borgmatic.nix b/nixos/tests/borgmatic.nix new file mode 100644 index 000000000000..70ad43e8bd35 --- /dev/null +++ b/nixos/tests/borgmatic.nix @@ -0,0 +1,24 @@ +import ./make-test-python.nix ({ 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") + ''; +})