decentralized coordination! hosts pull from a repo that can have any number of mirrors really.
bootstrap by importing the coordinate flake.
{
inputs.nixpkgs.url = "@NIXPKGS@";
inputs.minibase.url "git+https://src.cyb.red/pkgs/minibase";
inputs.mybase.url = "git+https://src.cyb.red/xjix/mfs.coordinate";
outputs = { nikpkgs, mybase, ... }@inputs:
let
hostname = "test";
in
{
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
modules = [
minibase.nixosModules.minibase-agent
mybase.nixosModules.mfs
];
};
};
}
the installed agent maintains replicas of the full system configuration.
minibase <- system flake
mfs.coordinate <- iteration flake -- container configs, rendezvouz data
---
/etc/nixos <- local configuration
/etc/grid <- your network
self.git
peers/
<handle>.git
stations/
each agent pulls from the coordination repo on a schedule or in response to an event. after the pull, each agent rebuilds and activates its configuration.
coms(8) can host multiple mqtt brokers!
we use ejabberd(8) because it provides a bunch of extra messaging protocols for free and is capable of operating as an HA cluster. the sqlite database is replicated using litefs(8). also redka(8).
future work with named-data-networking(8) may be able to replace mqtt with a network-level messaging primitive.
gitea(8), git-cdn(8)
attic(8), hydra(8), gitea-runner(8)
inputs.flake-registry = {
url = "github:nixos/flake-registry";
flake = false; # ??
};
nix.registry = import ./flake-registry.nix;