Skip to content

Mixin modules

AI space: headless host running the agents of one space (owner + members).

Server base with secrets isolated from the fleet: agents read untrusted input (mail, web, chat), so the host only decrypts its own usr/secrets/hosts/<hostname>.yaml. Usually a microVM guest (features: ["microvm-guest:<hypervisor>"]), bare metal works too.

Agent tooling, declared once per space (usr/machines/<host>/configuration.nix) and shared by the OpenClaw assistant and every member’s Claude Code / Codex / OpenCode (darkone.home.aiSpace, on by default in the space-member home):

  • mcp: MCP servers, local (command) or remote (url);
  • skills: SKILL.md content, a file or a skill directory, by name;
  • enableClaude, enableCodex, enableOpenCode: CLIs for members and for OpenClaw delegation;
  • packages: tools on the agents’ PATH and in members’ homes;
  • projectsDir: shared projects, writable by every member and the agent (group projects, setgid, default ACL), ~/projects in members’ homes.
darkone.host.ai-space = {
mcp.fetch = { command = "uvx"; args = [ "mcp-server-fetch" ]; };
mcp.github = {
command = "github-mcp-server";
args = [ "stdio" ];
secretEnv = [ "GITHUB_PERSONAL_ACCESS_TOKEN" ]; # sops: mcp/github/<VAR>
};
skills.commit-style = ./skills/commit-style;
packages = [ pkgs.uv pkgs.pandoc pkgs.github-mcp-server ];
};
  • enable bool AI space host (isolated agents workspace)
  • mcp attrs MCP servers of the space: OpenClaw and members’ Claude Code / Codex / OpenCode.
  • skills attrs Skills of the space, by name: inline SKILL.md, a SKILL.md file or a skill directory. Given to OpenClaw and members’ Claude Code / Codex / OpenCode.
  • enableClaude bool Claude Code for members and for OpenClaw (coding-agent delegation).
  • enableCodex bool Codex CLI for members and for OpenClaw (coding-agent delegation).
  • enableOpenCode bool OpenCode for members and for OpenClaw (coding-agent delegation).
  • packages listOf package Tools of the space: OpenClaw PATH and members’ homes.
  • projectsDir str Shared projects of the space: every member and the OpenClaw agent (its working dir) read and write them, ~/projects in members’ homes.
darkone.host.ai-space = {
enable = false;
mcp = { };
skills = { };
enableClaude = true;
enableCodex = true;
enableOpenCode = true;
packages = [ ];
projectsDir = "/var/lib/projects";
};

A full desktop configuration with gnome, multimedia and office tools.

  • enable bool Desktop optimized host configuration
darkone.host.desktop.enable = false;

DNF gateway: backup uplinks. Doc: ../gateway.nix header.

  • backupLinks attrs Fallback uplinks, used when the WAN has no link, no lease or no Internet. Name: [a-z][a-z0-9-]*.
    • type enum [ "ethernet" "wifi" ] ethernet: DHCP client on a spare port, always up. wifi: WPA2/WPA3 client, radio off (rfkill) until no preferred link reaches the Internet; SSID and passphrase are read from sops (backup-link/&lt;name&gt;/ssid, backup-link/&lt;name&gt;/psk).
    • interface str Interface carrying the link: neither the WAN, a LAN port nor a hostapd radio.
    • priority ints.between 1 99 Lower is preferred among backup links (route metric 200 + 10 × priority, the WAN staying at 100).
  • linkCheck.targets nonEmptyListOf str IP addresses pinged through each uplink; one answer is enough. IP literals only: the probe must not depend on DNS.
  • linkCheck.interval ints.positive Seconds between two probe rounds.
  • linkCheck.failAfter ints.positive Failed rounds before an uplink is penalised.
  • linkCheck.recoverAfter ints.positive Good rounds before a penalised uplink is restored (hysteresis).
darkone.host.gateway.backup-links = {
backupLinks.type = null;
backupLinks.interface = "wlp4s0";
backupLinks.priority = 10;
linkCheck.targets = internetProbeTargets;
linkCheck.interval = 10;
linkCheck.failAfter = 3;
linkCheck.recoverAfter = 6;
};

The main gateway / router of a local network zone.

Sub-module (gateway/): backup-links.nix, backup uplinks.

  • enable bool Enable gateway features for the current host (dhcp, dns, proxy, etc.)
darkone.host.gateway.enable = false;

The main headscale coordination server.

  • enable bool Enable headscale coordination server
  • enableClient bool Enable tailscale client on HCS node (recommended to host services)
darkone.host.hcs = {
enable = false;
enableClient = true;
};

Desktop config + laptop specific tools & configuration.

  • enable bool Laptop optimized host configuration
darkone.host.laptop.enable = false;

Every host configuration is based on this minimal config.

  • enable bool Minimal host configuration
  • secure bool Prefer more secure options (disable mutable users…)
darkone.host.minimal = {
enable = false;
secure = false;
};

Portable configuration for a bootable USB drive containing a NixOS machine from the local network.

  • enable bool Portable host configuration for usb keys
darkone.host.portable.enable = false;

Improved configuration for servers (minimal, no sleep, watchdog…).

  • enable bool Server host minimal configuration
  • enableWatchdog bool Enable systemd watchdog
darkone.host.server = {
enable = false;
enableWatchdog = true;
};

Host profile: UMI (Unified Multimodal Input) workstation, usable without keyboard/mouse.

  • enable bool UMI host configuration: multimodal input, touch + voice + gaze (Onboard, Talon, Tobii)
  • autoLoginUser nullOr str Auto-login user (mandatory for a keyboard-free session), a host user with the umi profile.
  • package nullOr package Talon package (defaults to pkgs.talon from the talon-nix overlay when available).
darkone.host.umi = {
enable = false;
autoLoginUser = null;
package = pkgs.talon or null;
};

Virtual machines guest tools.

  • enableVirtualbox bool Virtualbox client
  • enableQemu bool Qemu/KVM client
  • enableXen bool Xen client
darkone.host.vm = {
enableVirtualbox = false;
enableQemu = false;
enableXen = false;
};

Profile for advanced users (computer scientists, developers, admins).

  • enable bool Advanced user (admin sys, developper)
darkone.profile.advanced.enable = false;