{ config, pkgs, ... }:
{
  environment.systemPackages = with pkgs; [
    restic
    restic-browser
    restic-integrity
  ];

  services.restic.backups = {
    jallen-nas = {
      initialize = true;
      createWrapper = true;
      inhibitsSleep = true;
      environmentFile = config.sops.templates."restic.env".path;
      passwordFile = config.sops.secrets."desktop/restic/password".path;
      repositoryFile = config.sops.secrets."desktop/restic/repo".path;
      paths = [
        "/home/matt"
      ];
      exclude = [
        "/home/matt/Steam"
        "/home/matt/Heroic"
        "/home/matt/1TB"
        "/home/matt/Downloads"
        "/home/matt/Nextcloud"
        "/home/matt/.cache"
        "/home/matt/.local/share/Steam"
        "/home/matt/.var/app/com.valvesoftware.Steam"
        "/home/matt/.tmp"
        "/home/matt/.thumbnails"
        "/home/matt/.compose-cache"
      ];
    };
    proton-drive = {
      initialize = true;
      createWrapper = true;
      inhibitsSleep = true;
      passwordFile = config.sops.secrets."desktop/restic/password".path;
      rcloneConfigFile = "/home/matt/.config/rclone/rclone.conf";
      repository = "rclone:proton-drive:backup-nix";
      paths = [
        "/home/matt"
      ];
      exclude = [
        "/home/matt/Steam"
        "/home/matt/Heroic"
        "/home/matt/1TB"
        "/home/matt/Downloads"
        "/home/matt/Nextcloud"
        "/home/matt/.cache"
        "/home/matt/.local/share/Steam"
        "/home/matt/.var/app/com.valvesoftware.Steam"
        "/home/matt/.tmp"
        "/home/matt/.thumbnails"
        "/home/matt/.compose-cache"
      ];
    };
  };
}
