From 424d9e42242a74617754ddf2a25a94212dcaa943 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sat, 11 May 2024 00:20:55 +0200 Subject: [PATCH] syncoid on photoprism --- nixos/machines/chungus/configuration.nix | 4 ++-- .../chungus/{rbackup.nix => sync-rbackup.nix} | 0 .../chungus/{disko-syncoid.nix => sync-syncoid.nix} | 13 ++++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) rename nixos/machines/chungus/{rbackup.nix => sync-rbackup.nix} (100%) rename nixos/machines/chungus/{disko-syncoid.nix => sync-syncoid.nix} (62%) diff --git a/nixos/machines/chungus/configuration.nix b/nixos/machines/chungus/configuration.nix index d6ab97f..6f4a2ab 100644 --- a/nixos/machines/chungus/configuration.nix +++ b/nixos/machines/chungus/configuration.nix @@ -10,7 +10,6 @@ ./hardware-configuration - ./disko-syncoid.nix ./packages.nix ./network-wireguard.nix @@ -45,9 +44,10 @@ #./home-display.nix - ./rbackup.nix + ./sync-rbackup.nix ./sync-torrent.nix ./sync-script.nix + ./sync-syncoid.nix ./services-s3.nix ./services-vault.nix diff --git a/nixos/machines/chungus/rbackup.nix b/nixos/machines/chungus/sync-rbackup.nix similarity index 100% rename from nixos/machines/chungus/rbackup.nix rename to nixos/machines/chungus/sync-rbackup.nix diff --git a/nixos/machines/chungus/disko-syncoid.nix b/nixos/machines/chungus/sync-syncoid.nix similarity index 62% rename from nixos/machines/chungus/disko-syncoid.nix rename to nixos/machines/chungus/sync-syncoid.nix index 8972585..cce7f1b 100644 --- a/nixos/machines/chungus/disko-syncoid.nix +++ b/nixos/machines/chungus/sync-syncoid.nix @@ -1,5 +1,11 @@ -{ ... }: +{ config, ... }: { + + sops.secrets.syncoid_private_key = { + key = "rsync_private_key"; + owner = config.services.syncoid.user; + }; + services.syncoid = { enable = true; commands.service2 = { @@ -14,6 +20,11 @@ source = "zroot/postgresql"; target = "zraid/mirror/postgresql"; # should not be created up front! }; + commands.photoprism = { + sshKey = config.sops.secrets.syncoid_private_key.path; + source = "root@orbi:zmedia/photoprism"; + target = "zraid/mirror/photoprism"; # should not be created up front! + }; commonArgs = [ # Does not create new snapshot, only transfers existing "--no-sync-snap"