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"; 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 let
clan = clan-core.lib.buildClan { clan = clan-core.lib.buildClan {
self = self; # this needs to point at the repository root self = self; # this needs to point at the repository root
specialArgs = {}; specialArgs = {};
inventory.meta.name = "NEEDS_TO_BE_UNIQUE"; # TODO: Changeme meta.name = throw "Change me to something unique";
machines = { machines = {
berlin = { berlin = {
@@ -99,7 +104,12 @@ For the provide flake example, your flake should now look like this:
in in
{ {
nixosConfigurations = clan.nixosConfigurations; nixosConfigurations = clan.nixosConfigurations;
inherit (clan) clanInternals; inherit (clan) clanInternals;
clan = {
inherit (clan) templates;
};
}; };
} }
``` ```

View File

@@ -4,11 +4,14 @@ let
metaOptions = { metaOptions = {
name = lib.mkOption { name = lib.mkOption {
type = types.str; type = types.strMatching "[a-zA-Z0-9_-]*";
example = "my_clan";
description = '' description = ''
Name of the clan. Name of the clan.
Needs to be (globally) unique, as this determines the folder name where the flake gets downloaded to. 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 { description = lib.mkOption {