No description
  • Nix 66.5%
  • Python 19.4%
  • Shell 9.4%
  • HCL 2.6%
  • JavaScript 0.8%
  • Other 1.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kiara Grouwstra b388a458cb
Some checks failed
checks-api-deploy-env-apex / api-deploy-env-apex (push) Successful in 4s
checks-core-docs / core-docs (push) Successful in 12s
checks-api-http / api-http (push) Successful in 13s
checks-api-pinned-schema / api-pinned-schema (push) Successful in 12s
checks-api-python-tests / api-python-tests (push) Successful in 12s
checks-panel-api-frontend / panel-api-frontend (push) Successful in 9s
checks-api-treefmt / api-treefmt (push) Successful in 10s
checks-panel-db-diagram / panel-db-diagram (push) Successful in 12s
checks-panel-migrations / panel-migrations (push) Successful in 12s
checks-api-db-diagram / api-db-diagram (push) Successful in 10s
checks-api-asyncapi-validate / api-asyncapi-validate (push) Successful in 14s
checks-api-docs / api-docs (push) Successful in 12s
checks-api-openapi-validate / api-openapi-validate (push) Successful in 11s
checks-contracts-ldap-lldap / contracts-ldap-lldap (push) Successful in 19s
checks-test-valkey-service / test-valkey-service (push) Successful in 16s
flake-show-api / flake-show-api (push) Successful in 9s
checks-api-schema-parity / api-schema-parity (push) Successful in 14s
checks-contracts-structure / contracts-structure (push) Successful in 28s
checks-test-otel-collector-service / test-otel-collector-service (push) Successful in 22s
checks-contracts-services / contracts-services (push) Successful in 30s
nix-unit-resources / resources (push) Successful in 7s
checks-deployment-tf-hosts-bootstrap / deployment-tf-hosts-bootstrap (push) Successful in 42s
checks-deployment-ssh-hosts / deployment-ssh-hosts (push) Successful in 47s
publish-core / publish-core (push) Successful in 29s
checks-contracts-secrets / contracts-secrets (push) Successful in 43s
flake-show-core / flake-show-core (push) Successful in 14s
checks-applications-catalog / applications-catalog (push) Successful in 11s
checks-panel-python-tests / panel-python-tests (push) Successful in 44s
checks-deployment-cd-env-credentials / deployment-cd-env-credentials (push) Successful in 10s
flake-show-panel / flake-show-panel (push) Successful in 13s
flake-show-root / flake-show-root (push) Successful in 13s
checks-asyncapi-docs / asyncapi-docs (push) Successful in 15s
deploy-incus / deploy (push) Successful in 53s
nixosConfigurations-dev / dev-dev4 (push) Successful in 23s
checks-contracts-redis-valkey / contracts-redis-valkey (push) Successful in 19s
nixosConfigurations-dev / dev-forgejo (push) Successful in 23s
deploy-forgejo / deploy (push) Successful in 58s
checks-deployment-cd-env-host-key / deployment-cd-env-host-key (push) Successful in 14s
nixosConfigurations-hosting-provider / hosting-provider-api (push) Successful in 26s
nixosConfigurations-hosting-provider / hosting-provider-authelia (push) Successful in 29s
checks-tf-providers / tf-providers (push) Successful in 51s
deploy-fediversity-ci / deploy (push) Successful in 1m6s
nixosConfigurations-hosting-provider / hosting-provider-bind (push) Successful in 28s
checks-integrations-publish-records-named / integrations-publish-records-named (push) Successful in 18s
nixosConfigurations-hosting-provider / hosting-provider-lldap (push) Successful in 29s
checks-apps-tf / apps-tf (push) Successful in 1m19s
checks-deployment-cd-env-incus-identity / deployment-cd-env-incus-identity (push) Successful in 6s
checks-test-incus-service / test-incus-service (push) Successful in 1m8s
checks-contracts-smtp-maddy / contracts-smtp-maddy (push) Successful in 30s
checks-deployment-cd-env-kv / deployment-cd-env-kv (push) Successful in 8s
checks-integrations-smtp-reports / integrations-smtp-reports (push) Successful in 20s
checks-deployment-cd-env-profile / deployment-cd-env-profile (push) Successful in 7s
checks-panel-basic / panel-basic (push) Successful in 18s
checks-deployment-cd-env-oidc / deployment-cd-env-oidc (push) Successful in 9s
checks-integrations-bridge-dns / integrations-bridge-dns (push) Successful in 15s
checks-deployment-domain-claim-probe / deployment-domain-claim-probe (push) Successful in 9s
nixosConfigurations-hosting-provider / hosting-provider-netbox (push) Successful in 32s
nixosConfigurations-hosting-provider / hosting-provider-otel-collector (push) Successful in 22s
checks-core-treefmt / core-treefmt (push) Successful in 19s
nixosConfigurations-dev / dev-dev2 (push) Successful in 52s
checks-deployment-remote-path-fallback / deployment-remote-path-fallback (push) Successful in 9s
checks-deployment-eval-cache / deployment-eval-cache (push) Successful in 9s
checks-integrations-cd-jwt-login / integrations-cd-jwt-login (push) Successful in 20s
checks-integrations-octodns-powerdns / integrations-octodns-powerdns (push) Successful in 54s
nixosConfigurations-dev / dev-dev3 (push) Successful in 55s
checks-integrations-incus-shared-store / integrations-incus-shared-store (push) Successful in 56s
checks-test-lldap-mail / test-lldap-mail (push) Successful in 1m22s
checks-deployment-nixos-hosts / deployment-nixos-hosts (push) Successful in 1m32s
nixosConfigurations-dev / dev-fediversity-ci (push) Successful in 54s
nixosConfigurations-hosting-provider / hosting-provider-panel (push) Successful in 27s
checks-integrations-dns-key-render / integrations-dns-key-render (push) Successful in 23s
nixosConfigurations-hosting-provider / hosting-provider-garage (push) Successful in 55s
nixosConfigurations-hosting-provider / hosting-provider-smtp (push) Successful in 25s
checks-panel-screenshots / panel-screenshots (push) Successful in 18s
nixosConfigurations-hosting-provider / hosting-provider-postgresql (push) Successful in 40s
nixosConfigurations-hosting-provider / hosting-provider-openbao (push) Successful in 48s
checks-test-monitoring-storage / test-monitoring-storage (push) Successful in 18s
checks-deployment-unit-parsers / deployment-unit-parsers (push) Successful in 7s
checks-contracts-postgresql / contracts-postgresql (push) Successful in 1m13s
checks-deployment-tld-handles-probe / deployment-tld-handles-probe (push) Successful in 8s
checks-deployment-tf-self-state-reachable / deployment-tf-self-state-reachable (push) Successful in 9s
deploy-dev2 / deploy (push) Successful in 1m44s
checks-integrations-destroy-detaches-state / integrations-destroy-detaches-state (push) Successful in 8s
checks-apps-api / apps-api (push) Successful in 1m40s
nixosConfigurations-hosting-provider / hosting-provider-telemetry (push) Successful in 20s
checks-integrations-migrate-after-failed-apply / integrations-migrate-after-failed-apply (push) Successful in 7s
checks-integrations-dry-run-runs-nothing / integrations-dry-run-runs-nothing (push) Successful in 8s
nixosConfigurations-hosting-provider / hosting-provider-valkey (push) Successful in 21s
checks-integrations-openbao-pki / integrations-openbao-pki (push) Successful in 19s
checks-apps-panel / apps-panel (push) Successful in 1m38s
checks-deployment-verdict-spawn / deployment-verdict-spawn (push) Successful in 1m26s
checks-integrations-postgresql-provision / integrations-postgresql-provision (push) Successful in 20s
nixosConfigurations-hosting-provider / hosting-provider-spire (push) Successful in 44s
checks-test-netbox-service / test-netbox-service (push) Successful in 30s
checks-integrations-incus-token-publish / integrations-incus-token-publish (push) Successful in 25s
nixosConfigurations-hypervisor / hypervisor-incus (push) Successful in 24s
nixosConfigurations-hosting-provider / hosting-provider-overview (push) Successful in 58s
nixosConfigurations-hosting-provider / hosting-provider-windmill (push) Successful in 25s
checks-integrations-cold-start / integrations-cold-start (push) Successful in 21s
checks-integrations-apex-key-mint / integrations-apex-key-mint (push) Successful in 23s
nixosConfigurations-operator / operator-lldap (push) Successful in 22s
checks-integrations-smtp-dkim / integrations-smtp-dkim (push) Successful in 21s
nixosConfigurations-operator / operator-mastodon (push) Successful in 22s
checks-integrations-octodns-netbox / integrations-octodns-netbox (push) Successful in 2m7s
checks-panel-treefmt / panel-treefmt (push) Successful in 9s
nixosConfigurations-operator / operator-peertube (push) Successful in 19s
checks-integrations-octodns-kv-txt / integrations-octodns-kv-txt (push) Successful in 2m9s
checks-integrations-plan-does-not-apply / integrations-plan-does-not-apply (push) Successful in 7s
checks-integrations-publish-records / integrations-publish-records (push) Successful in 7s
checks-integrations-migrate-target-hint / integrations-migrate-target-hint (push) Successful in 7s
checks-integrations-published-names / integrations-published-names (push) Successful in 7s
checks-integrations-reclaim-own-lock / integrations-reclaim-own-lock (push) Successful in 7s
checks-integrations-register-ek-evidence / integrations-register-ek-evidence (push) Successful in 7s
checks-integrations-steady-refuses-lost-state / integrations-steady-refuses-lost-state (push) Successful in 7s
checks-integrations-steady-backend-freshness / integrations-steady-backend-freshness (push) Successful in 8s
publish-panel / publish-panel (push) Successful in 23s
nixosConfigurations-operator / operator-smtp (push) Successful in 19s
deploy-dev3 / deploy (push) Successful in 2m27s
nixosConfigurations-operator / operator-pixelfed (push) Successful in 22s
checks-panel-js-tests / panel-js-tests (push) Successful in 6s
nixosConfigurations-hosting-provider / hosting-provider-terraform-backend (push) Successful in 49s
checks-test-forgejo-anubis-allow / test-forgejo-anubis-allow (push) Successful in 15s
checks-resources-secrets-agenix / resources-secrets-agenix (push) Successful in 15s
nixosConfigurations-operator / operator-valkey (push) Successful in 22s
checks-integrations-spire-openbao / integrations-spire-openbao (push) Successful in 20s
Nix flake completeness check / _complete (push) Successful in 2m21s
nixosConfigurations-operator / operator-authelia (push) Successful in 50s
checks-panel-docs / panel-docs (push) Successful in 17s
dispatch-sentinel / dispatch-sentinel (push) Successful in 4s
devShells-default / core-default (push) Successful in 8s
checks-treefmt / treefmt (push) Successful in 13s
publish-api / publish-api (push) Successful in 11s
publish-asyncapi / publish-asyncapi (push) Successful in 11s
checks-test-otel-wiring / test-otel-wiring (push) Successful in 15s
publish-swagger / publish-swagger (push) Successful in 11s
devShells-default / root-default (push) Successful in 13s
checks-integrations-lldap-provision / integrations-lldap-provision (push) Successful in 1m16s
nix-unit-components / components (push) Successful in 20s
nix-unit-render / render (push) Successful in 6s
checks-test-lldap-admin-release / test-lldap-admin-release (push) Successful in 39s
nix-unit-contracts / contracts (push) Successful in 35s
nix-unit-effects / effects (push) Successful in 38s
checks-test-lldap-seed-isolation / test-lldap-seed-isolation (push) Successful in 51s
checks-integrations-octodns-bind / integrations-octodns-bind (push) Successful in 3m23s
checks-deployment-tf-incus-operator / deployment-tf-incus-operator (push) Successful in 3m26s
nix-unit-testers / testers (push) Successful in 31s
nix-unit-lib / lib (push) Successful in 32s
checks-contracts-postgresql-rotation / contracts-postgresql-rotation (push) Successful in 3m25s
checks-integrations-garage-provision / integrations-garage-provision (push) Successful in 2m54s
checks-test-ldap-engine / test-ldap-engine (push) Successful in 2m17s
checks-deployment-tf-hosts / deployment-tf-hosts (push) Successful in 5m4s
nix-unit-setups / setups (push) Successful in 4m24s
checks-test-pixelfed-service / test-pixelfed-service (push) Successful in 5m39s
checks-test-mastodon-service / test-mastodon-service (push) Successful in 6m7s
checks-deployment-verdict-failed / deployment-verdict-failed (push) Successful in 7m43s
checks-test-peertube-service / test-peertube-service (push) Successful in 6m27s
checks-deployment-verdict-chain / deployment-verdict-chain (push) Successful in 9m41s
checks-deployment-ssh-recovery / deployment-ssh-recovery (push) Successful in 13m46s
checks-integrations-spire-incus / integrations-spire-incus (push) Successful in 13m50s
checks-deployment-verdict-loop / deployment-verdict-loop (push) Successful in 14m42s
deploy-hosting-provider / deploy (push) Failing after 17m45s
checks-apps-tf-incus / apps-tf-incus (push) Successful in 18m10s
checks-deployment-tf-incus-hosts / deployment-tf-incus-hosts (push) Successful in 21m3s
Merge pull request 'Use the declarative-runtime pairings in place of the vendored copies' (#2069) from kiara/fediversity:declarative-runtime-pairings into main
Reviewed-on: #2069
2026-10-13 13:51:49 +02:00
.forgejo Merge remote-tracking branch 'origin/main' into lldap-typed-runtime 2026-10-12 22:50:40 +02:00
api api: pin Swagger UI with npins 2026-10-12 16:46:29 +02:00
core runtime: use the declarative-runtime pairings in place of the vendored copies 2026-10-13 13:12:31 +02:00
examples docs: name the check paths and the core layout as they are 2026-09-04 20:23:49 +02:00
nix docs: make the local setup commands complete, check env var coverage 2026-10-12 13:54:08 +02:00
notes ldap: reconcile groups, seeded users and memberships with OpenTofu 2026-10-12 15:30:48 +02:00
npins npins: pin declarative-runtime to the pairings branch of the fork 2026-10-13 13:25:03 +02:00
panel panel: copy an API token from the account page 2026-10-12 15:12:40 +02:00
.envrc Move formatting over to treefmt (#1012) 2026-06-04 19:37:21 +02:00
.gitignore octodns: drop a __pycache__ committed by accident 2026-08-19 22:25:27 +02:00
default.nix ci: root the npins sources on the runner hosts and move the eval-only checks to ram-2g 2026-09-09 00:40:08 +02:00
flake.lock use data model (#597) 2026-03-02 20:01:06 +01:00
flake.nix flakes: instantiate each entrypoint once per system 2026-08-12 21:43:02 +02:00
LICENSE Initial commit 2024-10-02 12:13:02 +02:00
README.md docs: tell how to enable the Nix features nix-command and flakes 2026-10-08 18:39:41 +02:00
ruff.toml panel: drop the api-client wrappers no view calls 2026-09-06 13:26:43 +02:00
shell.nix promote nix-module-form + nix-docs-lib to org repos (#1200) 2026-07-12 19:06:14 +02:00
treefmt.nix runtime: use the declarative-runtime pairings in place of the vendored copies 2026-10-13 13:12:31 +02:00
ty.toml panel: generate the documentation screenshots from the running UI 2026-09-11 20:28:10 +02:00

The Fediversity project

This repository contains all the code and code-related files having to do with the Fediversity project.

Goals

Decentralise the operational responsibility for social media. Enable a more robust market of hosting providers, by making it easy to migrate operations and data to different providers.

Note that Fediversity is not about self-hosting. There already exist solutions for self-hosting, but they're not suitable for what we're trying to do. The ones we're aware of require substantial technical knowledge and time commitment by system-operators, especially for scaling to thousands of users. Not everyone has the expertise and time to run their own server.

Status: in development

see our:

Interactions

To reach these goals, we aim to implement the following interactions between actors (depicted with rounded corners) and system components (see the glossary, depicted with rectangles).

Concepts

The actors involved and the vocabulary this project uses are documented at https://core.pages.git.fediversity.eu/concepts.html.

Development

All the code made for this project is freely licenced under EUPL. This means, anyone can use the work here to learn from it or change it according to their needs. You can even read up on development proceedings.

Contact the project team if you have questions or suggestions, or if you're interested in using Fediversity software for your operations:

Prerequisites

The instructions in this repository use Nix. Most of them use the nix command with a flake reference, for example nix run .#terraform-backend-dev. These commands need the experimental features nix-command and flakes. If these features are not enabled, Nix stops with error: experimental Nix feature 'nix-command' is disabled.

To enable the features for all commands, add this line to ~/.config/nix/nix.conf (or to /etc/nix/nix.conf):

experimental-features = nix-command flakes

On NixOS, set nix.settings.experimental-features = [ "nix-command" "flakes" ]; in your system configuration.

To enable the features for one command only, put the option after nix and before the subcommand:

nix --extra-experimental-features 'nix-command flakes' run .#terraform-backend-dev

For more information, refer to Flakes on the NixOS wiki.

The nix-shell and nix-build commands do not need these features. When an instruction also gives a command without flakes, you can use that command.

Content of this repository

Most of the directories in this repository have their own README going into more details as to what they are for. As an overview:

  • panel/ contains the code of our front-end.

  • core/ contains source code handling deployments.

Documentation sites

Each component's rendered docs are published on push to main under pages.git.fediversity.eu (see notes/git-pages.md):

  • core -- the core NixOS options/module and library docs.
  • panel -- the Django front-end docs.
  • api -- the API docs, plus its wire surface as Swagger UI (HTTP) and AsyncAPI (Centrifugo pub/sub).

Entrypoints

Rather than one monolithic root flake, each top-level component owns its own entrypoint (a flake.nix + default.nix following the transparent-wrapper pattern), and consumers address it directly:

  • core/ -- the shared library leaf (data model, resources, effects, components, setups) plus the pure render combinator that turns a groups set into the orchestration surface: nixosConfigurations, the <group>-<effect>-<machine> deployment packages/apps/devShells, legacyPackages, core-docs, the core-scoped formatter and the default dev shell. core/default.nix runs render with its in-tree frontend-free groups, so ./core#... exposes a default deploy family out of the box.
  • api/, panel/ -- each leaf owns its packages, checks, formatter and devShells. Addressed as ./api#..., etc. (The nix-module-form widget the panel embeds lives in its own org repo, consumed here via an npins pin. npins/README.md records, for each pin that is a fork, a branch or a non-vendor source, why it is one and when it can go.)
  • the repo root (./) stays thin, retaining only what is inherently root-anchored (see below).

Enumerating attributes cheaply

nix flake show forces every leaf on the surface to report its type, name and meta.description, and the deploy family is ~1400 attributes wide per entrypoint. When all you need is the list of names, ask for the attrset spine instead:

nix eval --json ./core#packages.x86_64-linux --apply builtins.attrNames

This is what nix-flake-check.sh uses to walk the surface. For the deployment family specifically, nix build ./core#deployment-attributes yields the same { attribute, machine } records the api's detect-at-submit guard reads, as JSON, and core/docs/md/flake-attributes-intro.md documents the <group>-<effect>-<machine>[-<verb>] grammar the names follow, so a name can usually be constructed rather than looked up.

When you do run nix flake show, note that its eval cache is keyed on the flake's locked-ref fingerprint: a dirty working tree has no rev and so no fingerprint, and --impure disables the cache outright. Committing first is what makes a repeated nix flake show free.

Why the root entrypoint cannot be removed

Two concerns force a repo-root flake to survive; both are documented inline in default.nix:

  1. The deploying-vs-deployed boundary. The generated deploy configuration.nix bakes (import repoRoot {}).boundary.<system> and resolves the operator config through boundary.<system>.deploymentPlan, whose caller is imported as import (repoRoot + "/${caller}") args. Those caller strings span several trees, and hosts-common.nix / the deployment constants.nix anchor root-path at the repo root, so ./. there must remain the repo root.
  2. The infra / cross-cutting checks. core/checks/default.nix aggregates checks that cross core/, nix/contracts and multiple leaves, and resist a clean per-leaf split (shared runNixOSTest overlay, requiredMemory passthru, repo-root caller paths), so the root retains them as its checks output.

The root also owns the one repo-wide concern that must scan the whole tree: the pre-commit hook (git-hooks treefmt + trim-trailing-whitespace, src = ./.). Per-leaf treefmt checks cover each leaf's own languages; the repo-wide hook is the backstop so no file falls between leaf scopes.

The out-of-tree npins / flake-mode caveat

Each entrypoint reads its dependencies via sources ? import ../npins, reaching the single npins/ directory at the repo root -- there is no per-leaf npins copy. In flake mode (./core#...) Nix copies each flake's own subtree to the store, so ../npins is only reachable because npins/ is git-tracked at the root; flake mode ignores untracked files. Two consequences:

  • New leaf files (flake.nix, flake.lock) must be tracked with git add (or git add -N) before a flake-mode eval sees them, otherwise ../npins (and the leaf itself) resolves against an incomplete tree and fails with a 'npins' is too short to be a valid store path error.
  • The leaf flakes are system-scoped and guard builtins.currentSystem (see core/default.nix), but CI evals still pass --impure so currentSystem is available in pure flake eval. Path-mode (import ./core {} / nix-build ./core -A ...) reaches ../npins unconditionally and yields drvPaths identical to flake mode.

Usage

Loading the nix shell should install a pre-commit hook.