2026-05-06 12:13:00 +03:00
2026-05-06 12:03:46 +03:00
2026-05-06 12:13:00 +03:00
2026-05-05 23:23:49 +03:00
2026-05-06 08:48:17 +03:00
2026-05-05 23:23:49 +03:00
2026-05-05 23:23:49 +03:00
2026-05-06 08:48:17 +03:00
2026-05-05 23:23:49 +03:00

Personal Site

Overview

Static personal website built with Nix and org-publish. Deployed to Cloudflare Pages via CI/CD on a Gitea runner (Raspberry Pi).

Quick Start

nix run          # build site and serve at http://localhost:8080
nix run .#tunnel # serve + Cloudflare HTTPS tunnel + QR code
nix build        # build only → result/ symlink

Project Structure

personal-site/
├── flake.nix          Nix flake — inputs, build derivation, run apps
├── build.el           Emacs Lisp org-publish configuration
├── content/           Source pages as org files
│   ├── index.org      Homepage → /index.html
│   └── about.org      About page → /about.html
├── static/            Static assets, copied verbatim
│   └── style.css      Site stylesheet
├── README.org         This file
└── CLAUDE.md          Instructions for the Claude AI assistant

The build produces a public/ directory (gitignored) which becomes the nix build output. Sub-projects are embedded as subdirectories (e.g. /project-a/).

Maintenance

Adding a page

  1. Create content/<name>.org with at minimum:

    #+TITLE: Page Title
    
    Content here.
  2. Add a link to the nav in build.el (the site-nav variable at the top).

Adding a sub-project

Sub-projects are separate Nix flakes that produce a static site as their default package.

  1. Add the flake input in flake.nix:

    project-a = {
      url = "path:/path/to/project-a";   # or git URL
      inputs.nixpkgs.follows = "nixpkgs";
    };
  2. Expose the package in the let block:

    subProjectA = inputs.project-a.packages.${system}.default;
  3. Copy it into the site output in installPhase:

    mkdir -p $out/project-a
    cp -r ${subProjectA}/. $out/project-a/
  4. Optionally add a nav link in build.el.

Styling

static/style.css uses CSS custom properties defined in :root. Dark mode is applied automatically via @media (prefers-color-scheme: dark).

Key variables:

Variable Purpose
--bg Page background
--fg Body text
--accent Links and highlights
--muted Secondary text
--border Dividers and box borders
--code-bg Code block background
--max-width Content column width

Updating dependencies

nix flake update

Deployment

The site is deployed to Cloudflare Pages automatically on push via a Gitea Actions workflow running on a Raspberry Pi runner (aarch64-linux). The nix build output is uploaded directly as the Pages deployment artifact.

S
Description
No description provided
Readme 122 KiB
Languages
Emacs Lisp 32.5%
JavaScript 27.7%
CSS 20%
Nix 19.8%