rename clanName -> meta.name
Some checks failed
buildbot/nix-eval Build done.
checks / checks-impure (pull_request) Failing after 1m22s

This commit is contained in:
Jörg Thalheim 2024-06-17 14:20:44 +02:00
parent e918214f1a
commit b12cdc15e5
11 changed files with 14 additions and 14 deletions

View File

@ -4,14 +4,14 @@
In the `flake.nix` file:
- [x] set a unique `clanName`.
- [x] set a unique `meta.name`.
=== "**buildClan**"
```nix title="clan-core.lib.buildClan"
buildClan {
# Set a unique name
clanName = "Lobsters";
meta.name = "Lobsters";
# Should usually point to the directory of flake.nix
directory = ./.;
@ -31,7 +31,7 @@ In the `flake.nix` file:
```nix title="clan-core.flakeModules.default"
clan = {
# Set a unique name
clanName = "Lobsters";
meta.name = "Lobsters";
machines = {
jon = {

View File

@ -63,7 +63,7 @@ Below is a guide on how to structure this in your flake.nix:
# Define your clan
clan = {
# Clan wide settings. (Required)
clanName = ""; # Ensure to choose a unique name.
meta.name = ""; # Ensure to choose a unique name.
machines = {
jon = {

View File

@ -229,7 +229,7 @@ in
config = {
# for clan vm inspect
clanCore.vm.inspect = {
clan_name = config.clanCore.clanName;
clan_name = config.clanCore.meta.name;
machine_icon = config.clanCore.machineIcon or config.clanCore.clanIcon;
machine_name = config.clanCore.machineName;
machine_description = config.clanCore.machineDescription;

View File

@ -23,8 +23,8 @@ in
};
name = lib.mkOption {
type = lib.types.str;
default = config.clanCore.clanName;
defaultText = "config.clanCore.clanName";
default = config.clanCore.meta.name;
defaultText = "config.clanCore.meta.name";
description = ''
zerotier network name
'';

View File

@ -56,7 +56,7 @@ def inspect_flake(flake_url: str | Path, machine_name: str) -> FlakeConfig:
# Get the Clan name
cmd = nix_eval(
[
f'{flake_url}#clanInternals.machines."{system}"."{machine_name}".config.clanCore.clanName'
f'{flake_url}#clanInternals.machines."{system}"."{machine_name}".config.clanCore.meta.name'
]
)
res = run_cmd(cmd)

View File

@ -84,7 +84,7 @@ def machine_schema(
# potentially the config might affect submodule options,
# therefore we need to import it
config
{{ clanCore.clanName = "fakeClan"; }}
{{ clanCore.meta.name = "fakeClan"; }}
]
# add all clan modules specified via clanImports
++ (map (name: clan-core.clanModules.${{name}}) config.clanImports or []);

View File

@ -10,7 +10,7 @@
let
clan = clan-core.lib.buildClan {
directory = self;
clanName = "test_flake_with_core";
meta.name = "test_flake_with_core";
machines = {
vm1 =
{ lib, ... }:

View File

@ -10,7 +10,7 @@
let
clan = clan-core.lib.buildClan {
directory = self;
clanName = "test_flake_with_core_and_pass";
meta.name = "test_flake_with_core_and_pass";
machines = {
vm1 =
{ lib, ... }:

View File

@ -10,7 +10,7 @@
let
clan = clan-core.lib.buildClan {
directory = self;
clanName = "test_flake_with_core_dynamic_machines";
meta.name = "test_flake_with_core_dynamic_machines";
machines =
let
machineModules = builtins.readDir (self + "/machines");

View File

@ -14,7 +14,7 @@
imports = (import (pkgs.path + "/nixos/modules/module-list.nix")) ++ [
{
nixpkgs.hostPlatform = "x86_64-linux";
clanCore.clanName = "dummy";
clanCore.meta.name = "dummy";
}
];
};

View File

@ -11,7 +11,7 @@
# Usage see: https://docs.clan.lol
clan = clan-core.lib.buildClan {
directory = self;
clanName = "__CHANGE_ME__"; # Ensure this is internet wide unique.
meta.name = "__CHANGE_ME__"; # Ensure this is internet wide unique.
# Prerequisite: boot into the installer
# See: https://docs.clan.lol/getting-started/installer