From 5a017666f668b422f40621faa5d71dcd690eb534 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Mon, 21 Sep 2026 20:28:02 +0800 Subject: [PATCH] refactor(backup): name the REST endpoint restic.writefor.fun 'backup' did not say what the service is. --- BACKUP.md | 6 +++--- hosts/12kingdoms-youko/homelab-services/caddy.nix | 2 +- hosts/idols-ai/restic.nix | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BACKUP.md b/BACKUP.md index 6f186419..a0015ce4 100644 --- a/BACKUP.md +++ b/BACKUP.md @@ -20,7 +20,7 @@ How this fleet is backed up, where the data lives, and how to restore it. ([`modules/nixos/base/restic-backup.nix`](./modules/nixos/base/restic-backup.nix)). Encryption happens on the client, so the server only ever stores ciphertext. youko runs `restic-rest-server` with `--append-only` and `--private-repos`, authenticated by htpasswd, published behind caddy as - `backup.writefor.fun`. + `restic.writefor.fun`. 3. **cloud copy** (planned). youko will copy the homelab repositories with `restic copy` (it holds that password). Desktops copy their own: youko does not hold the desktop password. @@ -95,7 +95,7 @@ Remote (REST) repositories also need the service credentials: ```bash set -a; . /run/agenix/restic-rest-credentials; set +a -restic -r rest:https://backup.writefor.fun/idols-ai/ \ +restic -r rest:https://restic.writefor.fun/idols-ai/ \ --password-file /run/agenix/restic-password snapshots ``` @@ -131,6 +131,6 @@ Restoring a btrbk snapshot (offline; stop writers first): | [`modules/nixos/base/restic-backup.nix`](./modules/nixos/base/restic-backup.nix) | client module: repository, paths, excludes, schedule | | [`modules/nixos/base/btrbk.nix`](./modules/nixos/base/btrbk.nix) | local btrfs snapshots | | `hosts/12kingdoms-youko/default.nix` | the REST server and youko's own backup | -| `hosts/12kingdoms-youko/homelab-services/caddy.nix` | the `backup.writefor.fun` vhost | +| `hosts/12kingdoms-youko/homelab-services/caddy.nix` | the `restic.writefor.fun` vhost | | `secrets/nixos.nix` | which secret is defined on which host | | `hosts//restic.nix` | per-host backup configuration | diff --git a/hosts/12kingdoms-youko/homelab-services/caddy.nix b/hosts/12kingdoms-youko/homelab-services/caddy.nix index 852f8149..549377f2 100644 --- a/hosts/12kingdoms-youko/homelab-services/caddy.nix +++ b/hosts/12kingdoms-youko/homelab-services/caddy.nix @@ -64,7 +64,7 @@ in reverse_proxy http://localhost:3303 ''; # the restic REST server the backup clients push to - virtualHosts."backup.writefor.fun".extraConfig = '' + virtualHosts."restic.writefor.fun".extraConfig = '' ${hostCommonConfig} reverse_proxy http://localhost:8000 ''; diff --git a/hosts/idols-ai/restic.nix b/hosts/idols-ai/restic.nix index b1587097..768806f2 100644 --- a/hosts/idols-ai/restic.nix +++ b/hosts/idols-ai/restic.nix @@ -17,7 +17,7 @@ # credentials come from a systemd EnvironmentFile so they stay out of the URL. modules.restic-backup = { enable = true; - repository = "rest:https://backup.writefor.fun/idols-ai/"; + repository = "rest:https://restic.writefor.fun/idols-ai/"; environmentFile = config.age.secrets."restic-rest-credentials".path; paths = [