~cyplo/dotfiles

ref: 077d5b46ab8e0f39f9ff80865df09e222dc4d01a dotfiles/nixos/backups.nix -rw-r--r-- 804 bytes
077d5b46 — Cyryl Płotnicki nvidia drivers for foureighty 7 months ago
                                                                                
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
{ config, pkgs, ... }:
let
  extraArgs = [ "--exclude='.cache'" "--exclude='.rustup'" "--exclude='.cargo'" "--exclude '.local/share'" ];
in
  {

    services = {
      restic.backups.home-to-brix = {
        passwordFile = "/etc/nixos/secrets/restic-password-brix";
        paths = [ "/home" ];
        repository = "rest:http://brix:8000/";
        timerConfig = { OnCalendar = "hourly"; };
        extraBackupArgs = extraArgs;
      };

      restic.backups.home-to-b2 = {
        passwordFile = "/etc/nixos/secrets/restic-password-b2";
        paths = [ "/home" ];
        repository = "b2:cyplo-restic-${config.networking.hostName}:/";
        timerConfig = { OnCalendar = "hourly"; };
        extraBackupArgs = extraArgs;
        s3CredentialsFile = "/etc/nixos/secrets/b2-env";
      };
    };
  }