From 65c5f4883fd321c988c77644a7d1632ef583d984 Mon Sep 17 00:00:00 2001 From: Henri Dohmen Date: Thu, 8 Jan 2026 23:11:46 +0100 Subject: [PATCH] Sync to ~/Sync and remove obsolete backup --- host/roam/backup.nix | 68 +++++++++++++++++++++++--------------------- host/roam/git.nix | 2 +- mod/syncthing.nix | 4 +-- 3 files changed, 38 insertions(+), 36 deletions(-) diff --git a/host/roam/backup.nix b/host/roam/backup.nix index 2c27b21..0fa98c2 100644 --- a/host/roam/backup.nix +++ b/host/roam/backup.nix @@ -4,37 +4,39 @@ secrets, ... }: +# { +# age.secrets.roam-rclone-conf = { +# file = secrets.roam."rclone-conf.age"; +# mode = "440"; +# owner = "root"; +# group = "root"; +# }; +# +# systemd = { +# timers."backup-rclone" = { +# wantedBy = [ "timers.target" ]; +# timerConfig = { +# OnCalendar = "daily"; +# Persistent = true; +# Unit = "backup-rclone.service"; +# }; +# }; +# services."backup-rclone" = +# let +# conf = config.age.secrets.roam-rclone-conf.path; +# in +# { +# script = '' +# ${pkgs.rclone}/bin/rclone --config ${conf} copy /home/hd/Documents odc:Documents +# ${pkgs.rclone}/bin/rclone --config ${conf} copy /git odc:git +# ''; +# path = [ pkgs.rclone ]; +# serviceConfig = { +# Type = "oneshot"; +# User = "root"; +# }; +# }; +# }; +# } { - age.secrets.roam-rclone-conf = { - file = secrets.roam."rclone-conf.age"; - mode = "440"; - owner = "root"; - group = "root"; - }; - - systemd = { - timers."backup-rclone" = { - wantedBy = [ "timers.target" ]; - timerConfig = { - OnCalendar = "daily"; - Persistent = true; - Unit = "backup-rclone.service"; - }; - }; - services."backup-rclone" = - let - conf = config.age.secrets.roam-rclone-conf.path; - in - { - script = '' - ${pkgs.rclone}/bin/rclone --config ${conf} copy /home/hd/Documents odc:Documents - ${pkgs.rclone}/bin/rclone --config ${conf} copy /git odc:git - ''; - path = [ pkgs.rclone ]; - serviceConfig = { - Type = "oneshot"; - User = "root"; - }; - }; - }; -} +} # TODO: Backups for new Syncthing solution diff --git a/host/roam/git.nix b/host/roam/git.nix index 5a236c3..af897c0 100644 --- a/host/roam/git.nix +++ b/host/roam/git.nix @@ -26,7 +26,7 @@ in }; cgit."git" = { group = "git"; - enable = true; + enable = false; # FIXME: find out what breaks here scanPath = gitpath; nginx.virtualHost = cgit-host; }; diff --git a/mod/syncthing.nix b/mod/syncthing.nix index 7d23f66..77b496b 100644 --- a/mod/syncthing.nix +++ b/mod/syncthing.nix @@ -20,7 +20,7 @@ let folders-all = { documents = { id = "documents-hd"; - path = if is-server then "/data/sync/documents-hd" else "/home/hd/Documents"; + path = if is-server then "/data/sync/documents-hd" else "/home/hd/Sync"; type = if is-server then "receiveencrypted" else "sendreceive"; # all clients (desktops + servers) that have are a synthing peer but # with untrusted servers @@ -47,7 +47,7 @@ let folders-desktop = { supernote-note = rec { id = "supernote-note"; - path = if is-server then "/data/sync/${id}" else "/home/hd/Documents/Supernote/Notizen"; + path = if is-server then "/data/sync/${id}" else "/home/hd/Sync/Supernote/Notizen"; type = "sendreceive"; devices = desktop-devices ++ [ "supernote" ]; versioning = {