backup: 2026-08-29 06:59

This commit is contained in:
2026-08-29 06:59:35 +03:00
parent 07112f1a4c
commit 2a872c725b
19 changed files with 823 additions and 136 deletions
+13
View File
@@ -23,12 +23,18 @@ Attic (self-hosted Nix binary cache): cache name =main=, public key =main:9SZt/6
Eurovision Vote: Django app sourced from external flake =github:anerisgreat/eurovote=, wrapped by =modules/services/eurovote.nix=. Uses DynamicUser + StateDirectory so systemd owns =/var/lib/eurovote/=; no tmpfiles entry needed.
EmulatorJS: web game emulator at =games.zakobar.com= with an offline PWA + per-user save sync. See [[id:7148e7ef-7741-42ad-9d3d-4025001e1018][homey/emulatorjs]].
Backup: Restic daily at 03:00 to S3 (Backblaze B2, bucket =zakobar-home-backup=). Pre-hook: Nextcloud maintenance mode on + pg_dump. Post-hook: maintenance mode off. Manual offload: =restic copy= to local disk. NAR content and media excluded.
Reliability hardening in =hosts/pi-main/default.nix=: hardware watchdog (bcm2835_wdt), WiFi power save disabled, network watchdog timer, zramSwap zstd 25%, Nix build-dir on external HD.
Bootstrap: =pi-main-bootstrap= config builds an SD image (=sd-image-aarch64.nix=) for first flash.
** Subnodes
- [[id:7148e7ef-7741-42ad-9d3d-4025001e1018][homey/emulatorjs]] — EmulatorJS game emulator: offline PWA design, ROM management, save sync, PS1/large-ROM notes.
** Deployment
*Always deploy from the dev machine using the dev shell command:*
@@ -76,6 +82,8 @@ Caddy Cloudflare plugin secrets: uses =LoadCredential= + =ExecStart= override (c
Stirling-PDF login disable: =DOCKER_ENABLE_SECURITY=false= is build-time only. To disable the runtime login page, also set =SECURITY_ENABLELOGIN=false=.
Fetching external static assets via =fetchFromGitHub= (used by EmulatorJS, same pattern works for any GitHub-hosted release): get hash with =nix-prefetch-url --unpack <tarball-url>=, then convert to SRI with =nix hash convert --hash-algo sha256 --to sri <base32>=. To upgrade: bump =rev=, re-prefetch, update =hash=. Full upgrade instructions are in a comment inside =modules/services/emulatorjs.nix=.
** Gotchas
hdparm APM udev rule was removed — USB-SATA bridges often don't support APM commands and hdparm hangs indefinitely, causing boot-time crashes.
@@ -111,6 +119,7 @@ Admin SSH key is GPG-backed via YubiKey. Current key: =~/.ssh/gpg-as-ssh.pub= (=
- =modules/storage.nix= — external HD mount, =extraDirs= option
- =modules/backup.nix= — Restic, pre/post hooks, =extraPaths= option
- =scripts/ssh-with-gpg-key.sh= — emergency SSH via GPG key file; sets up ephemeral GNUPGHOME and uses =[A]= subkey
- =modules/services/emulatorjs.nix= + =emulatorjs-server.py= — EmulatorJS emulator; details in [[id:7148e7ef-7741-42ad-9d3d-4025001e1018][homey/emulatorjs]]
** TODOs
@@ -129,3 +138,7 @@ enableChunkedUpload = true
maxChunkSize = 5_000_000 # 5 MiB per chunk
#+end_src
[[id:7148e7ef-7741-42ad-9d3d-4025001e1018][homey/emulatorjs]]
[[id:2d455310-42a5-4ff5-be38-9af2b009aef7][homey/work-history/recent]]