NixOS configuration for ops-jrz1 VPS with Matrix platform
Find a file
Dan 75515c7e53 Update flake to NixOS 24.11
- nixpkgs: 24.05 (Dec 2024) → 24.11 (Jun 2025)
- sops-nix: unpinned (now follows nixpkgs)
- nixpkgs-unstable: Dec 2025 → Jan 2026

Key version changes:
- PostgreSQL 15.10 → 15.13 (pinned to v15)
- Forgejo 7.0.12 → 7.0.15 LTS
- Matrix-continuwuity 0.5.0-rc → 0.5.1 stable
- maubot 0.4.2 → 0.5.0
- systemd 255 → 256

Build verified, deployment in separate task.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 18:12:33 -08:00
.beads Remove unused Nix lambda patterns (deadnix cleanup) 2026-01-05 18:23:54 -08:00
.claude Add learner dev environment, testing infrastructure, and skills 2025-12-28 22:23:06 -05:00
docs Update DR runbook: first restore drill passed 2026-01-10 16:18:22 -08:00
hosts Add B2 automated backup with restic 2026-01-10 13:49:59 -08:00
modules Pin PostgreSQL to v15 for NixOS 24.11 upgrade 2026-01-10 16:07:13 -08:00
scripts Sync AI agent sandbox docs to dev-add.sh AGENTS.md 2026-01-10 08:09:25 -08:00
secrets Add offline sops recovery key 2026-01-10 15:40:31 -08:00
specs Rename learner to dev across codebase 2026-01-03 10:42:34 -08:00
templates/plugin-skeleton Add learner dev environment, testing infrastructure, and skills 2025-12-28 22:23:06 -05:00
tests Add VM integration test and shellcheck linting to flake checks 2026-01-08 11:04:00 -08:00
.gitattributes Add learner dev environment, testing infrastructure, and skills 2025-12-28 22:23:06 -05:00
.gitignore Add learner dev environment, testing infrastructure, and skills 2025-12-28 22:23:06 -05:00
.pre-commit-config.yaml Initialize ops-jrz1 repository with Matrix platform extraction foundation 2025-10-13 13:37:17 -07:00
.sops.yaml Add offline sops recovery key 2026-01-10 15:40:31 -08:00
AGENTS.md Revert "Document Forgejo API administration pattern" 2026-01-09 15:08:44 -08:00
CLAUDE.md refactor: standardize agent instruction files 2025-12-23 01:12:27 -05:00
configuration.nix Add devs group to nix trusted-users 2026-01-09 23:01:40 -08:00
flake.lock Update flake to NixOS 24.11 2026-01-10 18:12:33 -08:00
flake.nix Update flake to NixOS 24.11 2026-01-10 18:12:33 -08:00
GEMINI.md refactor: standardize agent instruction files 2025-12-23 01:12:27 -05:00
hardware-configuration.nix Remove unused Nix lambda patterns (deadnix cleanup) 2026-01-05 18:23:54 -08:00
LICENSE Initialize ops-jrz1 repository with Matrix platform extraction foundation 2025-10-13 13:37:17 -07:00
README.md Initialize ops-jrz1 repository with Matrix platform extraction foundation 2025-10-13 13:37:17 -07:00
SETUP-VERIFICATION.md Add docs, ignore local dev config 2025-12-08 16:31:40 -08:00

ops-jrz1 NixOS Server Configuration

Status: Work in Progress - Matrix Platform Extraction

This repository contains the NixOS configuration for the ops-jrz1 dev/test server, including extracted Matrix homeserver modules and bridge configurations from the ops-base production environment.

Overview

The ops-jrz1 server provides a Matrix homeserver (Continuwuity/Conduwuit) with bridges for:

  • Slack (mautrix-slack)
  • WhatsApp (mautrix-whatsapp)
  • Google Messages (mautrix-gmessages)

Additional services:

  • Security hardening (fail2ban, SSH hardening)
  • Secrets management (sops-nix with age encryption)

Current Status

Phase: Extracting and sanitizing modules from ops-base

  • Repository structure created
  • Skeleton configuration files (flake.nix, configuration.nix, hosts/ops-jrz1.nix)
  • Sanitization and validation scripts
  • Git hooks for security validation
  • Module extraction from ops-base
  • Documentation (deployment guides, bridge setup)
  • Server deployment and testing

Repository Structure

ops-jrz1/
├── flake.nix              # Nix flake configuration
├── configuration.nix       # Main NixOS configuration
├── hosts/
│   └── ops-jrz1.nix       # Server-specific configuration
├── modules/               # Extracted Matrix platform modules (pending)
├── docs/                  # Deployment and setup documentation (pending)
├── secrets/               # sops-nix encrypted secrets (gitignored)
├── scripts/               # Sanitization and validation scripts
│   ├── sanitize-files.sh
│   └── validate-sanitization.sh
└── specs/                 # Project planning and specifications
    └── 001-extract-matrix-platform/

Planned Features

Matrix Homeserver

  • Continuwuity/Conduwuit: Lightweight Rust-based Matrix homeserver
  • Federation support
  • User registration with tokens
  • Admin room for management

Bridges

  • Slack: Socket Mode authentication, workspace integration
  • WhatsApp: QR code pairing, message synchronization
  • Google Messages: Pairing flow, SMS/MMS support

Security & Operations

  • fail2ban: Intrusion prevention
  • SSH hardening: Key-only authentication, restricted access
  • sops-nix: Encrypted secrets management with age keys
  • Git hooks: Pre-commit validation, pre-push build checks

Development Workflow

Prerequisites

  • NixOS 24.05+ or Nix with flakes enabled
  • SSH access to ops-jrz1 server
  • Age encryption key for secrets management

Building Locally

# Check flake validity
nix flake check

# Build ops-jrz1 configuration
nix build .#nixosConfigurations.ops-jrz1

# Deploy to server (when ready)
nixos-rebuild switch --flake .#ops-jrz1 --target-host root@ops-jrz1

Sanitization Workflow

# Extract modules from ops-base
./scripts/sanitize-files.sh ~/proj/ops-base/modules staging/modules

# Validate sanitization
./scripts/validate-sanitization.sh staging/modules

# Move to permanent location
mv staging/modules/* modules/

Security Notes

  • Never commit secrets: All secrets managed via sops-nix, encrypted with age keys
  • Git hooks active: Pre-commit hooks validate for personal information leakage
  • Sanitization enforced: All extracted code must pass validation before commit

License

MIT License (see LICENSE file)

  • Project Specification: specs/001-extract-matrix-platform/spec.md
  • Implementation Plan: specs/001-extract-matrix-platform/plan.md
  • Task Breakdown: specs/001-extract-matrix-platform/tasks.md
  • Sanitization Rules: specs/001-extract-matrix-platform/contracts/sanitization-rules.yaml

Note: This repository is currently in active development. Documentation and deployment guides will be added as modules are extracted and tested.