docs: fix wrong roles assignment syntax

This commit is contained in:
Johannes Kirschbauer
2025-07-03 11:42:26 +02:00
parent b607e1ac25
commit fe47157a7c

View File

@@ -17,8 +17,10 @@ For example:
```nix ```nix
inventory.instances = { inventory.instances = {
borgbackup = { borgbackup = {
roles.client.machines = [ "laptop" "server1" ]; roles.client.machines."laptop" = {};
roles.server.machines = [ "backup-box" ]; roles.client.machines."server1" = {};
roles.server.machines."backup-box" = {};
}; };
} }
``` ```
@@ -40,7 +42,8 @@ Example of instantiating a `borgbackup` service using `clan-core`:
```nix ```nix
inventory.instances = { inventory.instances = {
# Instance Name: Different name for this 'borgbackup' instance # Instance Name: Different name for this 'borgbackup' instance
borgbackup-example = { borgbackup = {
# Since this is instances."borgbackup" the whole `module = { ... }` below is equivalent and optional.
module = { module = {
name = "borgbackup"; # <-- Name of the module (optional) name = "borgbackup"; # <-- Name of the module (optional)
input = "clan-core"; # <-- The flake input where the service is defined (optional) input = "clan-core"; # <-- The flake input where the service is defined (optional)