docs: rephrase add machines for planned dynamic templates

This commit is contained in:
Johannes Kirschbauer
2025-07-02 17:01:40 +02:00
parent 667bbffb3f
commit 58862215ab

View File

@@ -119,26 +119,34 @@ clan = {
1. It is required to define a *targetHost* for each machine before deploying. Best practice has been, to use the zerotier ip/hostname or the ip from the from overlay network you decided to use. 1. It is required to define a *targetHost* for each machine before deploying. Best practice has been, to use the zerotier ip/hostname or the ip from the from overlay network you decided to use.
2. Add your *ssh key* here - That will ensure you can always login to your machine via *ssh* in case something goes wrong. 2. Add your *ssh key* here - That will ensure you can always login to your machine via *ssh* in case something goes wrong.
### (Optional): Renaming Machine ### (Optional) Renaming a Machine
For renaming jon to your own machine name, you can use the following command: Older templates included static machine folders like `jon` and `sara`.
If your setup still uses such static machines, you can rename a machine folder to match your own machine name:
``` ```bash
git mv ./machines/jon ./machines/newname git mv ./machines/jon ./machines/<your-machine-name>
``` ```
Note that our clan lives inside a git repository. Since your Clan configuration lives inside a Git repository, remember:
Only files that have been added with `git add` are recognized by `nix`.
So for every file that you add or rename you also need to run:
``` * Only files tracked by Git (`git add`) are recognized.
git add ./path/to/my/file * Whenever you add, rename, or remove files, run:
```bash
git add ./machines/<your-machine-name>
``` ```
### (Optional): Removing a Machine to stage the changes.
If you only want to setup a single machine at this point, you can delete `sara` from `flake.nix` as well as from the machines directory: ---
``` ### (Optional) Removing a Machine
If you want to work with a single machine for now, you can remove other machine entries both from your `flake.nix` and from the `machines` directory. For example, to remove the machine `sara`:
```bash
git rm -rf ./machines/sara git rm -rf ./machines/sara
``` ```
Make sure to also remove or update any references to that machine in your `nix files` or `inventory.json` if you have any of that