Basic Syntax
:::admonition[Title]{type=info collapsible open}
Collapsiple Info
::: Types:
Important information
Important information
Important information
Important information
Collapsible
Collapsed info default open
Collapsed info default closed
Custom title
Important information
let
is = nix: nix;
in
{
this = is "valid";
} Highlight Code in a Snippet
{
this line is highlighted
this line is NOT highlighted
this line is highlighted
this line is highlighted
this line is highlighted
this line is NOT highlighted
} A consistent style greatly increases the usability of all documentation and communication. Please use this page as a reference and style guide for our internal and external documentation, blog posts, and all other Clan communication.
What readers know:
What readers don't know:
If specific knowledge is required, mention it at the start of the page.
The fastest path to understanding is a working example. People learn by doing, not by reading about doing.
Recommended structure:
Sentence structure:
Bad:
The following command, which utilizes nixos-facter to generate a comprehensive hardware report, will write the results back into the respective machine folder located on your setup device.
What the user does is hidden in the middle. nixos-facter is a leaked implementation detail.
Users care about hardware scanning, not the tool that does it.
Good:
This command generates a hardware report and saves it to your machine folder.
Lead with value. State what the reader will accomplish before explaining how.
Bad:
To create a new machine that you can later use as a webserver, first navigate to your Clan directory, then execute the clan machines create command with the --name flag followed by your desired machine name.
Good:
Create a new webserver machine in your Clan:
clan machines create - -name webserver Use progressive disclosure. Introduce concepts only when needed.
Recommended structure:
Keep examples focused:
Minimal comments
Let the code speak for itself. Paste code examples directly and without further alteration.
Bad:
# This sets the target host IP address for deployment
clan.networking.targetHost = "192.168.1.10"; # Change this to your machine's IP
# This enables SSH access
services.openssh.enable = true; # Required for Clan deployment Good:
{
clan.networking.targetHost = "192.168.XXX.XXX";
services.openssh.enable = true;
} Nix knowledge is a barrier, not a feature.
clan CLI commandsBad:
Before adding a machine, you need to understand the NixOS module system and attribute set merging.
Good:
Add a machine:
clan machines create webserver This creates machines/webserver/default.nix, where you can configure it via NixOS.
(After respecting the prior point)
Users learn the NixOS module system by seeing patterns first.
nix.dev for optional learningssh-ed25519 AAAAC3NzaC…192.168.XXX.XXX$, e.g. $YOUR-CLAN-NAME#elided, #omitted)