Run formatter

This commit is contained in:
pinpox
2025-08-25 18:40:51 +02:00
parent a9c53b8b1e
commit 41c52197ea
71 changed files with 2118 additions and 1379 deletions

View File

@@ -1,7 +1,8 @@
# How Templates work
Clan offers the ability to use templates for creating different resources.
It comes with some `<builtin>` templates and discovers all exposed templates from its flake's `inputs`
Clan offers the ability to use templates for creating different resources. It
comes with some `<builtin>` templates and discovers all exposed templates from
its flake's `inputs`
For example one can list all current templates like this:
@@ -38,7 +39,8 @@ Available 'machine' templates
Templates are referenced via the `--template` `selector`
clan-core ships its native/builtin templates. Those are referenced if the selector is a plain string ( without `#` or `./.` )
clan-core ships its native/builtin templates. Those are referenced if the
selector is a plain string ( without `#` or `./.` )
For example:
@@ -48,11 +50,14 @@ would use the native `<builtin>.flake-parts` template
## Selectors follow nix flake `reference#attribute` syntax
Selectors follow a very similar pattern as Nix's native attribute selection behavior.
Selectors follow a very similar pattern as Nix's native attribute selection
behavior.
Just like `nix build .` would build `packages.x86-linux.default` of the flake in `./.`
Just like `nix build .` would build `packages.x86-linux.default` of the flake in
`./.`
`clan flakes create --template=.` would create a clan from your **local** `default` clan template (`templates.clan.default`).
`clan flakes create --template=.` would create a clan from your **local**
`default` clan template (`templates.clan.default`).
In fact this command would be equivalent, just make it more explicit
@@ -60,10 +65,11 @@ In fact this command would be equivalent, just make it more explicit
## Remote templates
Just like with Nix you could specify a remote url or path to the flake containing the template
Just like with Nix you could specify a remote url or path to the flake
containing the template
`clan flakes create --template=github:owner/repo#foo`
!!! Note "Implementation Note"
Not all features of Nix's attribute selection are currently matched.
There are minor differences in case of unexpected behavior please create an [issue](https://git.clan.lol/clan/clan-core/issues/new)
!!! Note "Implementation Note" Not all features of Nix's attribute selection are
currently matched. There are minor differences in case of unexpected behavior
please create an [issue](https://git.clan.lol/clan/clan-core/issues/new)