From c7a0d65d45d0604a0d86b7acde055f5ed990ec35 Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Wed, 22 Nov 2023 05:57:11 +0300 Subject: [PATCH] remove duplicacy --- machines/Home-Hypervisor/default.nix | 1 - profiles/servers/duplicacy.nix | 37 ---------------------------- 2 files changed, 38 deletions(-) delete mode 100644 profiles/servers/duplicacy.nix diff --git a/machines/Home-Hypervisor/default.nix b/machines/Home-Hypervisor/default.nix index 0c13908..b39b0d3 100644 --- a/machines/Home-Hypervisor/default.nix +++ b/machines/Home-Hypervisor/default.nix @@ -13,7 +13,6 @@ in { customProfiles.acme customProfiles.authentik customProfiles.battery-historian - customProfiles.duplicacy customProfiles.fail2ban # customProfiles.firefox-syncserver customProfiles.gitea diff --git a/profiles/servers/duplicacy.nix b/profiles/servers/duplicacy.nix deleted file mode 100644 index 9aef177..0000000 --- a/profiles/servers/duplicacy.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, lib, pkgs, ... }: -let - backend = config.virtualisation.oci-containers.backend; - pass-path = "/tmp/pass"; - gcd-path = "/tmp/gcd-token"; - config-path = "/repo"; - config-host-path = "/var/lib/duplicacy"; -in { - secrets.duplicacy-pass.services = [ "${backend}-duplicacy.service" ]; - secrets.gcd-token.services = [ "${backend}-duplicacy.service" ]; - - virtualisation.oci-containers.containers.duplicacy = { - autoStart = true; - environment = rec { - BACKUP_NAME = "homelab-duplicacy-backup"; - BACKUP_ENCRYPTION_KEY_FILE = pass-path; - BACKUP_SCHEDULE = "0 8 * * *"; - BACKUP_LOCATION = "gcd://backups/${BACKUP_NAME}"; - GCD_TOKEN = gcd-path; - # DUPLICACY_INIT_OPTIONS = "-storage-name ${BACKUP_NAME}"; - # If backing up from hdd, change threads to 1 - DUPLICACY_BACKUP_OPTIONS = "-threads 8 -stats"; - DUPLICACY_PRUNE_OPTIONS = "-keep 0:360 -keep 30:180 -keep 7:30"; - PRUNE_SCHEDULE = "0 9 * * *"; - DUPLICACY_CONFIG_PATH = config-path; - }; - image = "docker.io/ataraxiadev/duplicacy-autobackup"; - volumes = [ - "/srv:/data:ro" # backup folder - "${config-host-path}:${config-path}" # path to .duplicacy config - "${config.secrets.duplicacy-pass.decrypted}:${pass-path}:ro" - "${config.secrets.gcd-token.decrypted}:${gcd-path}:ro" - ]; - }; - - persist.state.directories = [ config-host-path ]; -} \ No newline at end of file