Choose even the first region in the browser; update Docker and Nix
A node now starts without any region (it only helps others connect, and prints a hint). The owner's sign-in link leads straight to the Regions page when none is followed, visitors get a notice instead of an empty search, and status always lists regions as an array. The Docker image no longer pins Bonn, the NixOS module no longer requires regions, and the VM test now starts without any, chooses the first region over the API and checks it survives a restart. README and the init hint follow. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
+7
-11
@@ -54,9 +54,12 @@ in
|
||||
default = [ ];
|
||||
example = [ "u1j" ];
|
||||
description = ''
|
||||
Regions to replicate: 3-character geohashes, each about 150 km wide.
|
||||
`u1j` is Bonn, `u1h` Cologne, `u1x` Hamburg. May be empty only for a
|
||||
bootstrap node ({option}`public`).
|
||||
Regions to start with: 3-character geohashes, each about 100 to 150 km
|
||||
wide. `u1j` is Bonn, `u1h` Cologne, `u1x` Hamburg. Leave it empty and
|
||||
the owner chooses by place name in the browser instead ("My listings"
|
||||
> "Regions"); that choice is kept in `regions.json` in
|
||||
{option}`dataDir` and wins over this list from then on (delete the file
|
||||
to go back to it).
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -108,7 +111,7 @@ in
|
||||
dataDir = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
default = "/var/lib/allmende";
|
||||
description = "Where keys, the admin token and the database live.";
|
||||
description = "Where keys, the admin token, the chosen regions and the database live.";
|
||||
};
|
||||
|
||||
extraArgs = lib.mkOption {
|
||||
@@ -120,13 +123,6 @@ in
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.regions != [ ] || cfg.public;
|
||||
message = "services.allmende.regions needs at least one region, for example [ \"u1j\" ] (only a public bootstrap node may have none).";
|
||||
}
|
||||
];
|
||||
|
||||
users.users.allmende = {
|
||||
isSystemUser = true;
|
||||
group = "allmende";
|
||||
|
||||
Reference in New Issue
Block a user