Commit graph

174 commits

Author SHA1 Message Date
acab920858
WIP: SSH configuration restructure
Backup of SSH reorganization changes for future reference.
2025-10-07 20:58:09 +08:00
a6fa8866ac
feat(fuchsia): implement backup strategy with explicit home paths
Add snapper and borgbackup for fuchsia home directory backups:

Snapper Configuration:
- Hourly snapshots of /home/sajenim
- Retention: 24 hourly, 7 daily, 4 weekly, 12 monthly
- Stored in nested .snapshots subvolume

Borgbackup Onsite:
- Backup to viridian over SSH (local network)
- Target: ssh://viridian/srv/borg-repo/fuchsia
- Hourly backups, unencrypted, deduplicated
- Same retention as snapper

Borgbackup Offsite:
- Backup to borgbase (internet)
- Target: li9kg944@li9kg944.repo.borgbase.com:repo
- Daily backups, encrypted (repokey-blake2), deduplicated
- Retention: 7 daily, 4 weekly, 12 monthly

Explicit Home Paths (valuable user data only):
- Documents, Pictures, Videos, Music, Downloads, Academics, Notes
- Dotfiles: .ssh, .gnupg

System Persist Data:
- SSH host keys, machine-id, nixos state
- Bluetooth, NetworkManager configurations

Intentionally Excluded:
- .config (managed declaratively via home-manager)
- .repositories (cloneable from GitHub)
- .cache and build artifacts

Treats viridian as central backup server, maintaining 3-2-1 strategy
(3 copies, 2 locations, 1 offsite).

chore(viridian): remove unused inputs parameter from borgbackup offsite
2025-10-07 19:14:11 +08:00
f24a7476a7
feat(viridian): add explicit persist data to backup strategy
Add critical system state from persist.nix to borgbackup jobs:
- SSH host keys (required for borg authentication)
- machine-id and nixos state
- Network and bluetooth configurations

Paths mirror persist.nix configuration for maintainability.
Service-specific persist data (traefik, crowdsec) excluded -
will create dedicated subvolumes if/when needed.
2025-10-07 17:06:45 +08:00
7833d89d86
fix(viridian): resolve backup system initialization issues
Fix snapper and borgbackup jobs to work with ephemeral-btrfs setup:

Snapper fixes:
- Remove global /.snapshots mount (use nested subvolumes instead)
- Remove unused hostname variable
- Snapshots now stored in .snapshots subvolumes within each service

Borgbackup fixes:
- Add systemd.tmpfiles.rules to create staging directories at boot
- Add readWritePaths for staging directories (systemd sandboxing)
- Staging directories survive ephemeral root wipes

Architecture notes:
- Nested .snapshots subvolumes don't require separate mounts
- systemd tmpfiles ensures directories exist before services start
- ProtectSystem=strict requires explicit ReadWritePaths allowlist
2025-10-07 09:38:07 +08:00
c05598d9e0
feat(viridian): implement comprehensive 3-2-1 backup strategy
Add automated snapshot and backup system with three independent tiers:

Snapper (hourly local snapshots):
- Configure snapper for all srv-* subvolumes
- Tiered retention: 24 hourly, 7 daily, 4 weekly, 12 monthly
- Snapshots stored at /.snapshots on viridian drive
- Provides fast operational rollback for user errors

Borgbackup onsite (hourly local backups):
- Independent staging snapshots at /.staging-onsite
- Repository on data drive at /srv/borg-repo
- Unencrypted (physical security assumed)
- Matches snapper retention policy
- Fast local disaster recovery

Borgbackup offsite (daily remote backups):
- Independent staging snapshots at /.staging-offsite
- Encrypted backups to borgbase repository
- Retention: 7 daily, 4 weekly, 12 monthly
- Remote disaster recovery with prune policy

Architecture decisions:
- Separate staging directories prevent job conflicts
- Staging snapshots decouple borg jobs from snapper
- Consistent zstd,9 compression across both borg jobs
- Special case handling for containers subvolume path
2025-10-06 20:59:26 +08:00
b0bfb37d3c
refactor(viridian): migrate service data to dedicated BTRFS subvolumes
Migrate from path-based persistence (/persist/var/lib/*) to dedicated
BTRFS subvolumes for better data isolation and snapshot capabilities.

- Move valuable user-facing services to /srv/* with srv-* subvolumes:
  - forgejo: git repositories and database
  - opengist: paste data
  - minecraft: game world data
  - lighttpd: static web content
  - containers: OCI container volumes

- Update home directory to use hm-sajenim subvolume on viridian disk
- Remove jupyterhub service (no longer in use)
- Update borgbackup paths to match new service locations
- Follow upstream service defaults where possible for maintainability

Services kept on /persist (disposable state):
- traefik, crowdsec, murmur
2025-10-06 13:07:46 +08:00
591346600f
refactor: centralize unfree package allowlists
Move all allowUnfreePredicate declarations to global configs to prevent
the "last definition wins" merging issue. Unfree packages are now managed
in two central locations:
- NixOS system packages: nixos/common/global/default.nix
- Home Manager packages: home-manager/sajenim/global/default.nix
2025-10-01 10:23:20 +08:00
e5d1ba38d4
remove ollama service from fuchsia host
- Remove ollama service configuration and dependencies
- Clean up traefik routing for ollama web interface
- Comment out traefik service examples for clarity
2025-09-29 18:30:59 +08:00
969075a5de
refactor traefik + add open-webui service 2025-09-27 10:16:18 +08:00
bce8012209
chore: add all 2025-09-01 01:48:47 +08:00
7f5baabb23
remove project send 2025-09-01 01:47:13 +08:00
323820f797
fix: mariadb uses id 999 by default kinda suss 2025-08-07 22:26:18 +08:00
03a597ae6d
feat: setup projectsend docker containers 2025-08-07 21:41:33 +08:00
ffe0850ac9
backup opengist directory 2025-07-05 20:13:42 +08:00
961bfc2afb
setup opengist 2025-07-05 20:07:57 +08:00
2e635ce32f
update modpack 2025-06-15 08:48:29 +08:00
f4ac9c1753
chore: update server + refactor 2025-06-13 20:39:36 +08:00
23d1a07f26
fix: wrong port 2025-06-12 16:32:52 +08:00
af2fccb12f
update minecraft 2025-06-06 22:22:51 +08:00
ed9a836d2d
refactor 2025-06-06 18:35:13 +08:00
7b981cc126
setup irc network 2025-06-06 18:31:08 +08:00
f7fcccac4a
install murmur 2025-06-04 23:38:48 +08:00
18396e3ad4
remove allowlist 2025-05-30 15:46:35 +08:00
0e27c72344
setup jupyterhub 2025-05-05 08:12:27 +08:00
c38f58067a
opt in unfree 2025-04-30 12:18:32 +08:00
d611a670c5
chore: fix crowdsec 2025-04-03 19:03:15 +08:00
34c586aa9b
chore: update borg repo and passphrase 2025-03-26 13:34:07 +08:00
f26c63e3d8
chore: update backup directories 2025-03-23 23:27:00 +08:00
beb87db0bc
chore: migrate minecraft datadir 2025-03-23 23:16:43 +08:00
bb20d6c5f0
chore: remove redundant settings 2025-03-23 23:13:55 +08:00
8a66dfcaea
chore: remove unused services 2025-03-23 21:23:42 +08:00
e6b6325ba6
chore: refactor 2025-03-08 14:18:46 +08:00
822e6cdf9f
fix: Update NFS export IP address format 2025-02-18 21:56:49 +08:00
977fe7b608
bump multimedia tags 2025-02-16 11:58:25 +08:00
f0330126f9
migrate to github 2025-02-16 10:51:33 +08:00
2e37cefe3e
persist /var/private globally 2024-12-21 21:55:23 +08:00
579bf1a5db
migrate middlewares to entrypoint + refactor 2024-11-28 22:24:27 +08:00
205f85271b
enable whitelist for ipv4 ranges 2024-11-28 22:23:04 +08:00
12d1bd94a3
remove immich from borgbackups 2024-11-24 09:37:46 +08:00
3df22f9eb0
fix crowdsec/traefik 2024-11-24 09:36:36 +08:00
376627ba84
bump tags 2024-11-22 07:24:36 +08:00
1ecf47b006
migrate to 24.11 2024-11-22 07:17:23 +08:00
ea1ad13c53
remove immich 2024-11-22 07:16:44 +08:00
1f776ec51d
migrate internal domain to home.arpa 2024-11-22 07:15:34 +08:00
59509bd861
fix printer ip 2024-10-18 09:01:24 +08:00
0439a07ce8
update borgbase hosts 2024-10-18 09:00:41 +08:00
106f39a140
fix persistence 2024-10-16 07:12:04 +08:00
999740e7bd
move base data dir 2024-10-16 04:59:59 +08:00
9b13797b9b
install wiki-js 2024-10-16 04:59:02 +08:00
2e7fefa7b9
migrate backups to borgbase 2024-10-15 06:46:10 +08:00