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:
@@ -77,13 +77,18 @@ For the provide flake example, your flake should now look like this:
|
|||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
inputs.clan-core = {
|
||||||
|
url = "git+https://git.clan.lol/clan/clan-core";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
outputs = { self, 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;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user