docs: improve wording on getting-started

I found the header text to be confusing at places:
- `at least one machine to push to`: Pushing what? Where? DO I ned a git server? Do you mean installing?

-> I re-phrased the text

Also removed the tree command, as this is not available on most systems by default
This commit is contained in:
DavHau
2025-08-12 11:33:28 +07:00
parent df90fb20a0
commit caae6c7a55

View File

@@ -2,7 +2,11 @@
Ready to create your own Clan and manage a fleet of machines? Follow these simple steps to get started.
By the end of this guide, you'll have a fresh NixOS configuration ready to push to one or more machines. You'll create a new Git repository and a flake, and all you need is at least one machine to push to. This is the easiest way to begin, and we recommend you to copy your existing configuration into this new setup!
This guide walks your through setting up your own declarative infrastructure using clan, git and flakes. By the end of this, you will have one or more machines integrated and installed. You can then import your existing NixOS configuration into this setup if you wish.
The following steps are meant to be executed on the machine on which to administer the infrastructure.
In order to get started you should have at least one machine with either physical or ssh access available as an installation target. Your local machine can also be used as an installation target if it is already running NixOS.
## Prerequisites
@@ -10,7 +14,7 @@ By the end of this guide, you'll have a fresh NixOS configuration ready to push
Clan requires Nix to be installed on your system. Run the following command to install Nix:
```bash
```shellSession
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
```
@@ -30,17 +34,17 @@ By the end of this guide, you'll have a fresh NixOS configuration ready to push
Clan requires Nix to be installed on your system. Run the following command to install Nix:
```bash
```shellSession
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
```
If you have previously installed Nix, make sure `experimental-features = nix-command flakes` is present in `~/.config/nix/nix.conf` or `/etc/nix/nix.conf`. If this is not the case, please add it to `~/.config/nix/nix.conf`.
## Add Clan CLI to Your Shell
## Create a new clan
Create a new clan
Initialize a new clan flake
```bash
```shellSession
nix run https://git.clan.lol/clan/clan-core/archive/main.tar.gz#clan-cli --refresh -- flakes create
```
@@ -60,22 +64,16 @@ Enter a *name*, confirm with *enter*. A directory with that name will be created
## Explore the Project Structure
Take a look at all project files:
```bash
cd my-clan
tree
```
For example, you might see something like:
```{ .console .no-copy }
.
├── flake.nix
├── machines/
├── modules/
└── README.md
$ cd my-clan
$ ls
clan.nix flake.lock flake.nix modules sops
```
Dont worry if your output looks different — Clan templates evolve over time.
To interact with your newly created clan the you need to load the `clan` cli-package it into your environment by running:
@@ -83,19 +81,19 @@ To interact with your newly created clan the you need to load the `clan` cli-pac
=== "Automatic (direnv, recommended)"
- prerequisite: [install nix-direnv](https://github.com/nix-community/nix-direnv)
```
```shellSession
direnv allow
```
=== "Manual (nix develop)"
```
```shellSession
nix develop
```
verify that you can run `clan` commands:
```bash
```shellSession
clan show
```