- Python 54.8%
- Nix 42.1%
- HTML 3.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Treefmt / treefmt (push) Successful in 27s
Reviewed-on: #43 Reviewed-by: toonn <toonn@noreply.git.fediversity.eu> |
||
| .forgejo/workflows | ||
| api | ||
| examples/simple-hosting-provider | ||
| infra | ||
| nix | ||
| npins | ||
| .gitignore | ||
| architecture.svg | ||
| DEVELOPMENT.md | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
| shell.nix | ||
| treefmt.nix | ||
The Fedelementary School
This is a prototype for the Fediversity project, that comes with a different set of priorities than the current approach. The Fediversity project is creating a framework for small hosting providers to host web applications for customers (that we call operators).
Values
Leverage Nixpkgs as much as possible. Nixpkgs, which is also the code base for NixOS, is the biggest and freshest knowledge base for configuring software in the world. We want to utilise this strength by using the solutions that Nixpkgs provides wherever sensible.
Adding to the applications catalogue should be cheap. While Fediversity focussed on having Mastodon, Pixelfed and Peertube available for now, we want to make it easy to add to that catalogue. This is connected to the former value. If we keep modifications to Nixpkgs modules small, we can add and maintain anything that is supported by NixOS with little cost.
Fast security updates with minimal downtime. System updates on regular NixOS already restart only services that are actually affected by the update. By keeping this feature we can update early with minimal disruption.
Balanced incentives for customization vs. batteries included. Hosting providers will have many different reasons to integrate Fediversity into their remaining architecture. We try to provide a sliding scale between a "batteries included" default that just works stand-alone and customisations that can increase performance, reliability or observability. Hosting providers base these decisions on weighing the benefit of the customization and their cost of maintaining that custom code. We provide hosting providers with documentation and utilities for testing their changes.
Operators do their own SSO. While it would be very useful for operators to be able to offer Single sign-on or account provisioning to the users of their application instances, the current situation of the ecosystem is still too fractured to achieve this realistically. Therefore it's not in scope for now. SSO has to be configured by the operators themselves.
Architecture
The currently intended flow of information is described in this diagram. Please note that there are still a lot of missing pieces.
Prerequisites for installation
Fedelementary school is not yet meant to be installed by users, but here is a place to collect requirements:
-
The server that is running the Django application needs:
- Linux (preferably NixOS)
- Nix installed
- The ability to nest Linux namespaces (in the case of running inside an Incus container, this requires
security.nesting=true) - A way to authenticate against the REST API of the Incus server, either by HTTPS with TLS client certificates or via a Unix Domain Socket
- Ideally a public IP address and a domain name pointing to it
-
The server running Incus needs:
- The same CPU architecture as the server running the Django application
- A shared volume called fedelementary-nix-store (to be changed)
- Public IP addresses that can be routed to the instances