Commit graph

30 commits

Author SHA1 Message Date
85dc419349
refactor(ssh): decentralize SSH configuration to per-host services
Restructures SSH trust relationships from global to host-specific configuration
for better locality of concern and principle of least privilege.

Changes:
- Collapse nixos/common/global/ssh/ back to ssh.nix (single-file module)
- Move internal host trust (fuchsia/viridian) to per-host services/ssh/
- Split BorgBase known hosts by repository (li9kg944 for fuchsia, r7ag7x1w for viridian)
- Add viridian SSH server config to accept backup connections from fuchsia
- Add fuchsia borgbackup passphrase for offsite backups
- Configure viridian to create /srv/borg-repo/fuchsia for remote backups

This enables the 3-2-1 backup strategy with fuchsia backing up to both viridian
(onsite) and BorgBase (offsite) with proper SSH authentication.
2025-10-07 22:33:20 +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
bce8012209
chore: add all 2025-09-01 01:48:47 +08:00
03a597ae6d
feat: setup projectsend docker containers 2025-08-07 21:41:33 +08:00
961bfc2afb
setup opengist 2025-07-05 20:07:57 +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
0e27c72344
setup jupyterhub 2025-05-05 08:12:27 +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
7203fc1ed9
refactor 2024-09-20 20:24:55 +08:00
3350d19a45
fmt: alejandra 2024-08-08 09:02:42 +08:00
10d696d3d2
Remove SSH Tarpit and SSH logging in grafana 2024-07-09 09:48:17 +08:00
dc03244a3c
Setup crowdsec with ssh/firewall/traefik 2024-06-20 22:16:50 +08:00
0b4ce24253
Setup ssh/promtail/loki for grafana ssh dashboard 2024-06-13 21:37:38 +08:00
5e3f774b80
Migrate website from httpd to lighttpd 2024-06-06 20:35:50 +08:00
ec13d1b5cf
Setup webserver service 2024-06-03 21:14:12 +08:00
958f1e7042
Create samba shares 2024-06-03 21:10:23 +08:00
9f8378df75
Setup Forgejo service + Migrate git configurations 2024-06-03 21:05:04 +08:00
65764d76ff
Migrate to nix-minecraft 2024-06-03 20:55:53 +08:00
d557ddf4b2 remove httpd (migrate to github pages) 2024-04-01 10:01:36 +08:00
7ed0ad0d91 setup blog 2024-03-03 10:00:21 +08:00
236b8fbfeb setup mpd server 2024-02-13 23:03:10 +08:00
c4cb373083
fix imports 2024-01-23 09:48:52 +08:00
8a999ac546 refactor services 2024-01-21 21:00:06 +08:00
f993203643 increase import verbosity 2023-12-19 09:46:53 +08:00
26cb3aaabb remove httpd service import 2023-12-19 09:21:52 +08:00
38c07d5531 setup nextcloud 2023-12-19 09:21:33 +08:00
ec68333568 import services 2023-12-01 05:39:52 +08:00