Skip to content

Administration modules

Fleet update tool (fleet-update) and its unattended daily run.

enable installs the tool on a deployment host; just fleet-update then runs it. timer.enable adds a daily fleet-update --no-ui run: flake update, build, test by waves, switch.

  • enable bool fleet-update, the fleet update and deployment tool

  • package package The fleet-update package. Its nix-eval-jobs is matched to the system Nix: the tool evaluates the consumer flake with it.

  • aiPackages listOf package AI tools reachable from the unattended run (--ai-model). Optional: the tool warns and goes on without AI when none is found.

    Not a dependency of the package, because pkgs.claude-code is unfree and would force allowUnfree on every consumer. pkgs.opencode is MIT.

  • aiContext nullOr str Operator guidance (language, style) included in every AI prompt of a run on this host, just fleet-update and the timer alike. Written to /etc/fleet-update/ai-context, even without enable: in co-development the recipe runs the sources. --ai-context, on the command line or in timer.extraArgs, overrides it.

  • user nullOr str Account running the unattended update: owner of workDir, holding the git identity, the sops age key and the AI and Matrix credentials.

  • workDir str Consumer workspace on disk. Not the workDir module argument, which is its copy in the nix store.

  • timer.enable bool the daily unattended run (fleet-update --no-ui)

  • timer.onCalendar str When the run starts (systemd OnCalendar).

  • timer.extraArgs listOf str Options passed after --no-ui, which the module always sets.

  • timer.timeout str Longest run before systemd stops it (TimeoutStartSec). A hung run would otherwise hold the lock, and every later run would exit 4 without any alert.

darkone.admin.fleet-update = {
enable = false;
package = pkgs.fleet-update.override { nix-eval-jobs = nixEvalJobs; };
aiPackages = [ ];
aiContext = "Answer in French and keep the response concise.";
user = "admin";
workDir = "/etc/nixos";
timer.enable = false;
timer.onCalendar = "*-*-* 04:00";
timer.extraArgs = [ ];
timer.timeout = "6h";
};

Fleet host locator (dnf-locate): ssh finds a host wherever it is plugged.

A fleet name resolves to the host’s home address. Once the host roams (another zone, or outside on the tailnet), every ssh nix@<host> — colmena, fleet-update, just enter — would aim at that dead address. Enabled on an admin host, a ProxyCommand routes these connections through dnf-locate.

Paths tried, all derived from the topology:

  • <host>: home address, alone first — the usual case costs one lookup;
  • <host>.<zone domain>: reservation each zone holds for visiting hosts;
  • <host>.tailnet.internal: tailnet address (zone gateways resolve it).

The first path to answer on the port wins.

  • enable bool Route ssh to fleet hosts through dnf-locate (home, zone reservations, tailnet).
darkone.admin.locate.enable = config.darkone.admin.nix.enable;

NixOS configuration for the local LAN administrator computer.

  • enable bool Enable NIX configuration builder tools
  • enableNh bool Enable nix helper (nh) management tool
  • remoteBuilders.enable bool Offload builds to the fleet hosts flagged build-farm in config.yaml. Inert while no host carries the flag.
  • remoteBuilders.maxJobs int Parallel build slots to use on each farm.
  • remoteBuilders.speedFactor int Relative speed rating of a farm, compared to this host.
  • remoteBuilders.mandatoryFeatures listOf str Features a derivation MUST require for a farm to be offered it. This is what keeps small derivations off a remote (possibly slow) link. An empty list sends every eligible derivation to the farm.
  • remoteBuilders.supportedFeatures listOf str System features a farm can provide.
  • remoteBuilders.systems listOf str Platforms a farm builds for. Explicit rather than derived: hosts.nix only carries an architecture when it differs from the default.
darkone.admin.nix = {
enable = false;
enableNh = false;
remoteBuilders.enable = true;
remoteBuilders.maxJobs = 8;
remoteBuilders.speedFactor = 2;
remoteBuilders.mandatoryFeatures = [ ];
remoteBuilders.supportedFeatures = [ ];
remoteBuilders.systems = [ ];
};

First-boot welcome page of the admin host installed by darkone new.

At the first GNOME session of each wheel member, the browser opens a local page: step 1 of 4 done (the admin host), the gateway next, then services and the coordination server, with links to the documentation. Shown once per user (~/.local/state/dnf/welcome-shown). The “Onboarding” launcher of the nix-admin reopens it (darkone.admin.welcome.page).

  • enable bool the first-boot welcome page of the admin host
  • page path The welcome page, an HTML file of the store
darkone.admin.welcome = {
enable = false;
page = page;
};