Merge pull request 'docs-errata' (#3161) from docs-errata into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3161
This commit is contained in:
Mic92
2025-04-08 10:00:53 +00:00
2 changed files with 16 additions and 3 deletions

View File

@@ -78,12 +78,17 @@ For the provide flake example, your flake should now look like this:
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs, ... }:
inputs.clan-core = {
url = "git+https://git.clan.lol/clan/clan-core";
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, clan-core, ... }:
let
clan = clan-core.lib.buildClan {
self = self; # this needs to point at the repository root
specialArgs = {};
inventory.meta.name = "NEEDS_TO_BE_UNIQUE"; # TODO: Changeme
meta.name = throw "Change me to something unique";
machines = {
berlin = {
@@ -99,7 +104,12 @@ For the provide flake example, your flake should now look like this:
in
{
nixosConfigurations = clan.nixosConfigurations;
inherit (clan) clanInternals;
clan = {
inherit (clan) templates;
};
};
}
```

View File

@@ -4,11 +4,14 @@ let
metaOptions = {
name = lib.mkOption {
type = types.str;
type = types.strMatching "[a-zA-Z0-9_-]*";
example = "my_clan";
description = ''
Name of the clan.
Needs to be (globally) unique, as this determines the folder name where the flake gets downloaded to.
Should only contain alphanumeric characters, `_` and `-`.
'';
};
description = lib.mkOption {