diff --git a/lib/modules/inventoryClass/interface.nix b/lib/modules/inventoryClass/interface.nix index 4beba0381..16f8f54d3 100644 --- a/lib/modules/inventoryClass/interface.nix +++ b/lib/modules/inventoryClass/interface.nix @@ -255,6 +255,16 @@ in ''; }; + installedAt = lib.mkOption { + type = types.nullOr types.int; + default = null; + description = '' + Indicates when the machine was first installed. + + Timestamp is in unix time (seconds since epoch). + ''; + }; + tags = lib.mkOption { description = '' List of tags for the machine. diff --git a/pkgs/clan-app/ui/api/Inventory.ts b/pkgs/clan-app/ui/api/Inventory.ts new file mode 100644 index 000000000..0acdaff6d --- /dev/null +++ b/pkgs/clan-app/ui/api/Inventory.ts @@ -0,0 +1,6223 @@ +/* eslint-disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type AdminConfig = AdminConfigRoleDefault; +export type AdminConfig1 = AdminConfigRoleDefault1; +export type AutoUpgradeConfig = AutoUpgradeConfigRoleDefault; +export type AutoUpgradeConfig1 = AutoUpgradeConfigRoleDefault1; +export type BorgbackupConfig = + | BorgbackupConfigRoleClient + | BorgbackupConfigRoleServer; +export type BorgbackupConfig1 = + | BorgbackupConfigRoleClient1 + | BorgbackupConfigRoleServer1; +export type DataMesherConfig = + | DataMesherConfigRoleAdmin + | DataMesherConfigRolePeer + | DataMesherConfigRoleSigner; +export type DataMesherConfig1 = + | DataMesherConfigRoleAdmin1 + | DataMesherConfigRolePeer1 + | DataMesherConfigRoleSigner1; +export type DeltachatConfig = DeltachatConfigRoleDefault; +export type DeltachatConfig1 = DeltachatConfigRoleDefault1; +export type DiskIdConfig = DiskIdConfigRoleDefault; +export type DiskIdConfig1 = DiskIdConfigRoleDefault1; +export type ErgochatConfig = ErgochatConfigRoleDefault; +export type ErgochatConfig1 = ErgochatConfigRoleDefault1; +export type GarageConfig = GarageConfigRoleDefault; +export type GarageConfig1 = GarageConfigRoleDefault1; +export type HeisenbridgeConfig = HeisenbridgeConfigRoleDefault; +export type HeisenbridgeConfig1 = HeisenbridgeConfigRoleDefault1; +export type ImporterConfig = ImporterConfigRoleDefault; +export type ImporterConfig1 = ImporterConfigRoleDefault1; +export type IwdConfig = IwdConfigRoleDefault; +export type IwdConfig1 = IwdConfigRoleDefault1; +export type LocalsendConfig = LocalsendConfigRoleDefault; +export type LocalsendConfig1 = LocalsendConfigRoleDefault1; +export type MumbleConfig = MumbleConfigRoleServer; +export type MumbleConfig1 = MumbleConfigRoleServer1; +export type MyceliumConfig = MyceliumConfigRolePeer; +export type MyceliumConfig1 = MyceliumConfigRolePeer1; +export type PackagesConfig = PackagesConfigRoleDefault; +export type PackagesConfig1 = PackagesConfigRoleDefault1; +export type RootPasswordConfig = RootPasswordConfigRoleDefault; +export type RootPasswordConfig1 = RootPasswordConfigRoleDefault1; +export type SingleDiskConfig = SingleDiskConfigRoleDefault; +export type SingleDiskConfig1 = SingleDiskConfigRoleDefault1; +export type SshdConfig = SshdConfigRoleClient | SshdConfigRoleServer; +export type SshdConfig1 = SshdConfigRoleClient1 | SshdConfigRoleServer1; +export type StateVersionConfig = StateVersionConfigRoleDefault; +export type StateVersionConfig1 = StateVersionConfigRoleDefault1; +export type SyncthingConfig = + | SyncthingConfigRoleIntroducer + | SyncthingConfigRolePeer; +export type SyncthingConfig1 = + | SyncthingConfigRoleIntroducer1 + | SyncthingConfigRolePeer1; +export type UserPasswordConfig = UserPasswordConfigRoleDefault; +export type UserPasswordConfig1 = UserPasswordConfigRoleDefault1; +export type ZerotierConfig = + | ZerotierConfigRoleController + | ZerotierConfigRoleMoon + | ZerotierConfigRolePeer; +export type ZerotierConfig1 = + | ZerotierConfigRoleController1 + | ZerotierConfigRoleMoon1 + | ZerotierConfigRolePeer1; + +export interface Schema { + /** + * Multi host service module instances + */ + instances?: { + [k: string]: { + module?: { + /** + * Name of the input. Default to 'null' which means the module is local + * + */ + input?: null | string; + /** + * Attribute of the clan service module imported from the chosen input. + * + * Defaults to the name of the instance. + * + */ + name?: string; + }; + roles?: { + [k: string]: { + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | { + [k: string]: + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null; + } + )[]; + machines?: { + [k: string]: { + settings?: unknown; + }; + }; + settings?: unknown; + tags?: { + [k: string]: {}; + }; + }; + }; + }; + }; + /** + * Machines in the inventory. + * + * Each machine declared here can be referencd via its `attributeName` by the `inventory.service`s `roles`. + * + */ + machines?: { + [k: string]: { + deploy: { + /** + * SSH address of the host to build the machine on + */ + buildHost?: null | string; + /** + * SSH address of the host to deploy the machine to + */ + targetHost?: null | string; + }; + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * The module system that should be used to construct the machine + * + * Set this to `darwin` for macOS machines + * + */ + machineClass?: "nixos" | "darwin"; + /** + * Name of the machine or service + * + */ + name?: string; + /** + * List of tags for the machine. + * + * The machine can be referenced by its tags in `inventory.services` + * + * ???+ Example + * ```nix + * inventory.machines.machineA.tags = [ "tag1" "tag2" ]; + * ``` + * + * ```nix + * services.borgbackup."instance_1".roles.client.tags = [ "tag1" ]; + * ``` + * + * !!! Note + * Tags can be used to determine the membership of the machine in the services. + * Without changing the service configuration, the machine can be added to a service by adding the correct tags to the machine. + * + * + */ + tags?: string[]; + }; + }; + meta: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * 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 `-`. + * + */ + name: string; + }; + /** + * A mapping of module names to their path. + * + * Each module can be referenced by its `attributeName` in the `inventory.services` attribute set. + * + * !!! Important + * Each module MUST fulfill the following requirements to be usable with the inventory: + * + * - The module MUST have a `README.md` file with a `description`. + * - The module MUST have at least `features = [ "inventory" ]` in the frontmatter section. + * - The module MUST have a subfolder `roles` with at least one `{roleName}.nix` file. + * + * For further information see: [Module Authoring Guide](../../guides/services/community.md). + * + * ???+ example + * ```nix + * clan-core.lib.clan { + * # 1. Add the module to the available inventory modules + * inventory.modules = { + * custom-module = ./modules/my_module; + * }; + * # 2. Use the module in the inventory + * inventory.services = { + * custom-module.instance_1 = { + * roles.default.machines = [ "machineA" ]; + * }; + * }; + * }; + * ``` + * + */ + modules?: { + [k: string]: + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null; + }; + services?: { + admin?: { + [k: string]: { + config?: AdminConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: AdminConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: AdminRoles; + }; + }; + "auto-upgrade"?: { + [k: string]: { + config?: AutoUpgradeConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: AutoUpgradeConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: AutoUpgradeRoles; + }; + }; + borgbackup?: { + [k: string]: { + config?: BorgbackupConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: BorgbackupConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: BorgbackupRoles; + }; + }; + "data-mesher"?: { + [k: string]: { + config?: DataMesherConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: DataMesherConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: DataMesherRoles; + }; + }; + deltachat?: { + [k: string]: { + config?: DeltachatConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: DeltachatConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: DeltachatRoles; + }; + }; + "disk-id"?: { + [k: string]: { + config?: DiskIdConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: DiskIdConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: DiskIdRoles; + }; + }; + ergochat?: { + [k: string]: { + config?: ErgochatConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: ErgochatConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: ErgochatRoles; + }; + }; + garage?: { + [k: string]: { + config?: GarageConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: GarageConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: GarageRoles; + }; + }; + heisenbridge?: { + [k: string]: { + config?: HeisenbridgeConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: HeisenbridgeConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: HeisenbridgeRoles; + }; + }; + importer?: { + [k: string]: { + config?: ImporterConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: ImporterConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: ImporterRoles; + }; + }; + iwd?: { + [k: string]: { + config?: IwdConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: IwdConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: IwdRoles; + }; + }; + localsend?: { + [k: string]: { + config?: LocalsendConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: LocalsendConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: LocalsendRoles; + }; + }; + mumble?: { + [k: string]: { + config?: MumbleConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: MumbleConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: MumbleRoles; + }; + }; + mycelium?: { + [k: string]: { + config?: MyceliumConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: MyceliumConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: MyceliumRoles; + }; + }; + packages?: { + [k: string]: { + config?: PackagesConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: PackagesConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: PackagesRoles; + }; + }; + "root-password"?: { + [k: string]: { + config?: RootPasswordConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: RootPasswordConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: RootPasswordRoles; + }; + }; + "single-disk"?: { + [k: string]: { + config?: SingleDiskConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: SingleDiskConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: SingleDiskRoles; + }; + }; + sshd?: { + [k: string]: { + config?: SshdConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: SshdConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: SshdRoles; + }; + }; + "state-version"?: { + [k: string]: { + config?: StateVersionConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: StateVersionConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: StateVersionRoles; + }; + }; + syncthing?: { + [k: string]: { + config?: SyncthingConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: SyncthingConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: SyncthingRoles; + }; + }; + "user-password"?: { + [k: string]: { + config?: UserPasswordConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: UserPasswordConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: UserPasswordRoles; + }; + }; + zerotier?: { + [k: string]: { + config?: ZerotierConfig; + /** + * Enable or disable the complete service. + * + * If the service is disabled, it will not be added to any machine. + * + * !!! Note + * This flag is primarily used to temporarily disable a service. + * I.e. A 'backup service' without any 'server' might be incomplete and would cause failure if enabled. + * + */ + enabled?: boolean; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + machines?: { + [k: string]: { + config?: ZerotierConfig1; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + [k: string]: unknown; + }; + }; + meta?: { + /** + * Optional freeform description + * + */ + description?: null | string; + /** + * Under construction, will be used for the UI + * + */ + icon?: null | string; + /** + * Name of the machine or service + * + */ + name?: string; + }; + roles?: ZerotierRoles; + }; + }; + }; + /** + * Tags of the inventory are used to group machines together. + * + * It is recommended to use [`machine.tags`](#inventory.machines.tags) to define the tags of the machines. + * + * This can be used to define custom tags that are either statically set or dynamically computed. + * + * #### Static Tags + * + * ???+ example "Static Tag Example" + * ```nix + * inventory.tags = { + * foo = [ "machineA" "machineB" ]; + * }; + * ``` + * + * The tag `foo` will always be added to `machineA` and `machineB`. + * + * #### Dynamic Tags + * + * It is possible to compute tags based on the machines properties or based on other tags. + * + * !!! danger + * This is a powerful feature and should be used with caution. + * + * It is possible to cause infinite recursion by computing tags based on the machines properties or based on other tags. + * + * ???+ example "Dynamic Tag Example" + * + * allButFoo is a computed tag. It will be added to all machines except 'foo' + * + * `all` is a predefined tag. See the docs of [`tags.all`](#inventory.tags.all). + * + * ```nix + * # inventory.tags ↓ ↓ inventory.machines + * inventory.tags = {config, machines...}: { + * # ↓↓↓ The "all" tag + * allButFoo = builtins.filter (name: name != "foo") config.all; + * }; + * ``` + * + * !!! warning + * Do NOT compute `tags` from `machine.tags` this will cause infinite recursion. + * + */ + tags: { + [k: string]: string[]; + }; +} +export interface AdminConfigRoleDefault { + /** + * The allowed public keys for ssh access to the admin user + */ + allowedKeys?: { + [k: string]: string; + }; +} +export interface AdminConfigRoleDefault1 { + /** + * The allowed public keys for ssh access to the admin user + */ + allowedKeys?: { + [k: string]: string; + }; +} +export interface AdminRoles { + default?: { + config?: AdminConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface AdminConfigRoleDefault2 { + /** + * The allowed public keys for ssh access to the admin user + */ + allowedKeys?: { + [k: string]: string; + }; +} +export interface AutoUpgradeConfigRoleDefault { + /** + * Flake reference + */ + flake: string; +} +export interface AutoUpgradeConfigRoleDefault1 { + /** + * Flake reference + */ + flake: string; +} +export interface AutoUpgradeRoles { + default?: { + config?: AutoUpgradeConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface AutoUpgradeConfigRoleDefault2 { + /** + * Flake reference + */ + flake: string; +} +export interface BorgbackupConfigRoleClient { + /** + * destinations where the machine should be backuped to + * + */ + destinations?: { + [k: string]: { + /** + * the name of the backup job + */ + name?: string; + /** + * the borgbackup repository to backup to + */ + repo: string; + /** + * the rsh to use for the backup + */ + rsh?: string; + }; + }; + /** + * Directories/Files to exclude from the backup. + * Use * as a wildcard. + * + */ + exclude?: string[]; +} +export interface BorgbackupConfigRoleServer { + /** + * The directory where the borgbackup repositories are stored. + * + */ + directory?: string; +} +export interface BorgbackupConfigRoleClient1 { + /** + * destinations where the machine should be backuped to + * + */ + destinations?: { + [k: string]: { + /** + * the name of the backup job + */ + name?: string; + /** + * the borgbackup repository to backup to + */ + repo: string; + /** + * the rsh to use for the backup + */ + rsh?: string; + }; + }; + /** + * Directories/Files to exclude from the backup. + * Use * as a wildcard. + * + */ + exclude?: string[]; +} +export interface BorgbackupConfigRoleServer1 { + /** + * The directory where the borgbackup repositories are stored. + * + */ + directory?: string; +} +export interface BorgbackupRoles { + client?: { + config?: BorgbackupConfigRoleClient2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; + server?: { + config?: BorgbackupConfigRoleServer2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface BorgbackupConfigRoleClient2 { + /** + * destinations where the machine should be backuped to + * + */ + destinations?: { + [k: string]: { + /** + * the name of the backup job + */ + name?: string; + /** + * the borgbackup repository to backup to + */ + repo: string; + /** + * the rsh to use for the backup + */ + rsh?: string; + }; + }; + /** + * Directories/Files to exclude from the backup. + * Use * as a wildcard. + * + */ + exclude?: string[]; +} +export interface BorgbackupConfigRoleServer2 { + /** + * The directory where the borgbackup repositories are stored. + * + */ + directory?: string; +} +export interface DataMesherConfigRoleAdmin { + /** + * A list of bootstrap nodes that act as an initial gateway when joining + * the cluster. + * + */ + bootstrapNodes?: null | string[]; + network: { + /** + * The TTL for hosts in the network, in the form of a Go time.Duration + */ + hostTTL?: string; + /** + * The interface over which cluster communication should be performed. + * All the ip addresses associate with this interface will be part of + * our host claim, including both ipv4 and ipv6. + * + * This should be set to an internal/VPN interface. + * + */ + interface: string; + /** + * Port to listen on for cluster communication. + * + */ + port?: number; + /** + * Top level domain to use for the network + */ + tld?: string; + }; +} +export interface DataMesherConfigRolePeer { + /** + * A list of bootstrap nodes that act as an initial gateway when joining + * the cluster. + * + */ + bootstrapNodes?: null | string[]; + network: { + /** + * The interface over which cluster communication should be performed. + * All the ip addresses associate with this interface will be part of + * our host claim, including both ipv4 and ipv6. + * + * This should be set to an internal/VPN interface. + * + */ + interface: string; + /** + * Port to listen on for cluster communication. + * + */ + port?: number; + }; +} +export interface DataMesherConfigRoleSigner { + /** + * A list of bootstrap nodes that act as an initial gateway when joining + * the cluster. + * + */ + bootstrapNodes?: null | string[]; + network: { + /** + * The interface over which cluster communication should be performed. + * All the ip addresses associate with this interface will be part of + * our host claim, including both ipv4 and ipv6. + * + * This should be set to an internal/VPN interface. + * + */ + interface: string; + /** + * Port to listen on for cluster communication. + * + */ + port?: number; + }; +} +export interface DataMesherConfigRoleAdmin1 { + /** + * A list of bootstrap nodes that act as an initial gateway when joining + * the cluster. + * + */ + bootstrapNodes?: null | string[]; + network: { + /** + * The TTL for hosts in the network, in the form of a Go time.Duration + */ + hostTTL?: string; + /** + * The interface over which cluster communication should be performed. + * All the ip addresses associate with this interface will be part of + * our host claim, including both ipv4 and ipv6. + * + * This should be set to an internal/VPN interface. + * + */ + interface: string; + /** + * Port to listen on for cluster communication. + * + */ + port?: number; + /** + * Top level domain to use for the network + */ + tld?: string; + }; +} +export interface DataMesherConfigRolePeer1 { + /** + * A list of bootstrap nodes that act as an initial gateway when joining + * the cluster. + * + */ + bootstrapNodes?: null | string[]; + network: { + /** + * The interface over which cluster communication should be performed. + * All the ip addresses associate with this interface will be part of + * our host claim, including both ipv4 and ipv6. + * + * This should be set to an internal/VPN interface. + * + */ + interface: string; + /** + * Port to listen on for cluster communication. + * + */ + port?: number; + }; +} +export interface DataMesherConfigRoleSigner1 { + /** + * A list of bootstrap nodes that act as an initial gateway when joining + * the cluster. + * + */ + bootstrapNodes?: null | string[]; + network: { + /** + * The interface over which cluster communication should be performed. + * All the ip addresses associate with this interface will be part of + * our host claim, including both ipv4 and ipv6. + * + * This should be set to an internal/VPN interface. + * + */ + interface: string; + /** + * Port to listen on for cluster communication. + * + */ + port?: number; + }; +} +export interface DataMesherRoles { + admin?: { + config?: DataMesherConfigRoleAdmin2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; + peer?: { + config?: DataMesherConfigRolePeer2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; + signer?: { + config?: DataMesherConfigRoleSigner2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface DataMesherConfigRoleAdmin2 { + /** + * A list of bootstrap nodes that act as an initial gateway when joining + * the cluster. + * + */ + bootstrapNodes?: null | string[]; + network: { + /** + * The TTL for hosts in the network, in the form of a Go time.Duration + */ + hostTTL?: string; + /** + * The interface over which cluster communication should be performed. + * All the ip addresses associate with this interface will be part of + * our host claim, including both ipv4 and ipv6. + * + * This should be set to an internal/VPN interface. + * + */ + interface: string; + /** + * Port to listen on for cluster communication. + * + */ + port?: number; + /** + * Top level domain to use for the network + */ + tld?: string; + }; +} +export interface DataMesherConfigRolePeer2 { + /** + * A list of bootstrap nodes that act as an initial gateway when joining + * the cluster. + * + */ + bootstrapNodes?: null | string[]; + network: { + /** + * The interface over which cluster communication should be performed. + * All the ip addresses associate with this interface will be part of + * our host claim, including both ipv4 and ipv6. + * + * This should be set to an internal/VPN interface. + * + */ + interface: string; + /** + * Port to listen on for cluster communication. + * + */ + port?: number; + }; +} +export interface DataMesherConfigRoleSigner2 { + /** + * A list of bootstrap nodes that act as an initial gateway when joining + * the cluster. + * + */ + bootstrapNodes?: null | string[]; + network: { + /** + * The interface over which cluster communication should be performed. + * All the ip addresses associate with this interface will be part of + * our host claim, including both ipv4 and ipv6. + * + * This should be set to an internal/VPN interface. + * + */ + interface: string; + /** + * Port to listen on for cluster communication. + * + */ + port?: number; + }; +} +export interface DeltachatConfigRoleDefault {} +export interface DeltachatConfigRoleDefault1 {} +export interface DeltachatRoles { + default?: { + config?: DeltachatConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface DeltachatConfigRoleDefault2 {} +export interface DiskIdConfigRoleDefault {} +export interface DiskIdConfigRoleDefault1 {} +export interface DiskIdRoles { + default?: { + config?: DiskIdConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface DiskIdConfigRoleDefault2 {} +export interface ErgochatConfigRoleDefault {} +export interface ErgochatConfigRoleDefault1 {} +export interface ErgochatRoles { + default?: { + config?: ErgochatConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface ErgochatConfigRoleDefault2 {} +export interface GarageConfigRoleDefault {} +export interface GarageConfigRoleDefault1 {} +export interface GarageRoles { + default?: { + config?: GarageConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface GarageConfigRoleDefault2 {} +export interface HeisenbridgeConfigRoleDefault {} +export interface HeisenbridgeConfigRoleDefault1 {} +export interface HeisenbridgeRoles { + default?: { + config?: HeisenbridgeConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface HeisenbridgeConfigRoleDefault2 {} +export interface ImporterConfigRoleDefault {} +export interface ImporterConfigRoleDefault1 {} +export interface ImporterRoles { + default?: { + config?: ImporterConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface ImporterConfigRoleDefault2 {} +export interface IwdConfigRoleDefault { + /** + * Wifi networks to predefine + */ + networks?: { + [k: string]: { + /** + * Automatically try to join this wifi network + */ + AutoConnect?: boolean; + /** + * The name of the wifi network + */ + ssid?: string; + }; + }; +} +export interface IwdConfigRoleDefault1 { + /** + * Wifi networks to predefine + */ + networks?: { + [k: string]: { + /** + * Automatically try to join this wifi network + */ + AutoConnect?: boolean; + /** + * The name of the wifi network + */ + ssid?: string; + }; + }; +} +export interface IwdRoles { + default?: { + config?: IwdConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface IwdConfigRoleDefault2 { + /** + * Wifi networks to predefine + */ + networks?: { + [k: string]: { + /** + * Automatically try to join this wifi network + */ + AutoConnect?: boolean; + /** + * The name of the wifi network + */ + ssid?: string; + }; + }; +} +export interface LocalsendConfigRoleDefault { + /** + * The name that localsend will use to display your instance. + */ + displayName?: null | string; + /** + * Optional IPv4 address for ZeroTier network. + */ + ipv4Addr?: null | string; +} +export interface LocalsendConfigRoleDefault1 { + /** + * The name that localsend will use to display your instance. + */ + displayName?: null | string; + /** + * Optional IPv4 address for ZeroTier network. + */ + ipv4Addr?: null | string; +} +export interface LocalsendRoles { + default?: { + config?: LocalsendConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface LocalsendConfigRoleDefault2 { + /** + * The name that localsend will use to display your instance. + */ + displayName?: null | string; + /** + * Optional IPv4 address for ZeroTier network. + */ + ipv4Addr?: null | string; +} +export interface MumbleConfigRoleServer {} +export interface MumbleConfigRoleServer1 {} +export interface MumbleRoles { + server?: { + config?: MumbleConfigRoleServer2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface MumbleConfigRoleServer2 {} +export interface MyceliumConfigRolePeer { + /** + * Add hosted Public nodes + */ + addHostedPublicNodes?: boolean; + /** + * Open the firewall for mycelium + */ + openFirewall?: boolean; +} +export interface MyceliumConfigRolePeer1 { + /** + * Add hosted Public nodes + */ + addHostedPublicNodes?: boolean; + /** + * Open the firewall for mycelium + */ + openFirewall?: boolean; +} +export interface MyceliumRoles { + peer?: { + config?: MyceliumConfigRolePeer2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface MyceliumConfigRolePeer2 { + /** + * Add hosted Public nodes + */ + addHostedPublicNodes?: boolean; + /** + * Open the firewall for mycelium + */ + openFirewall?: boolean; +} +export interface PackagesConfigRoleDefault { + /** + * The packages to install on the machine + */ + packages: string[]; +} +export interface PackagesConfigRoleDefault1 { + /** + * The packages to install on the machine + */ + packages: string[]; +} +export interface PackagesRoles { + default?: { + config?: PackagesConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface PackagesConfigRoleDefault2 { + /** + * The packages to install on the machine + */ + packages: string[]; +} +export interface RootPasswordConfigRoleDefault {} +export interface RootPasswordConfigRoleDefault1 {} +export interface RootPasswordRoles { + default?: { + config?: RootPasswordConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface RootPasswordConfigRoleDefault2 {} +export interface SingleDiskConfigRoleDefault { + /** + * The primary disk device to install the system on + */ + device?: null | string; +} +export interface SingleDiskConfigRoleDefault1 { + /** + * The primary disk device to install the system on + */ + device?: null | string; +} +export interface SingleDiskRoles { + default?: { + config?: SingleDiskConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface SingleDiskConfigRoleDefault2 { + /** + * The primary disk device to install the system on + */ + device?: null | string; +} +export interface SshdConfigRoleClient { + certificate: { + /** + * List of domains to include in the certificate. This option will prepend the machine name in front of each domain before adding it to the certificate. + */ + searchDomains?: string[]; + }; +} +export interface SshdConfigRoleServer { + certificate: { + /** + * List of domains to include in the certificate. This option will prepend the machine name in front of each domain before adding it to the certificate. + */ + searchDomains?: string[]; + }; + hostKeys: { + rsa: { + /** + * Whether to enable Generate RSA host key. + */ + enable?: boolean; + }; + }; +} +export interface SshdConfigRoleClient1 { + certificate: { + /** + * List of domains to include in the certificate. This option will prepend the machine name in front of each domain before adding it to the certificate. + */ + searchDomains?: string[]; + }; +} +export interface SshdConfigRoleServer1 { + certificate: { + /** + * List of domains to include in the certificate. This option will prepend the machine name in front of each domain before adding it to the certificate. + */ + searchDomains?: string[]; + }; + hostKeys: { + rsa: { + /** + * Whether to enable Generate RSA host key. + */ + enable?: boolean; + }; + }; +} +export interface SshdRoles { + client?: { + config?: SshdConfigRoleClient2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; + server?: { + config?: SshdConfigRoleServer2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface SshdConfigRoleClient2 { + certificate: { + /** + * List of domains to include in the certificate. This option will prepend the machine name in front of each domain before adding it to the certificate. + */ + searchDomains?: string[]; + }; +} +export interface SshdConfigRoleServer2 { + certificate: { + /** + * List of domains to include in the certificate. This option will prepend the machine name in front of each domain before adding it to the certificate. + */ + searchDomains?: string[]; + }; + hostKeys: { + rsa: { + /** + * Whether to enable Generate RSA host key. + */ + enable?: boolean; + }; + }; +} +export interface StateVersionConfigRoleDefault {} +export interface StateVersionConfigRoleDefault1 {} +export interface StateVersionRoles { + default?: { + config?: StateVersionConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface StateVersionConfigRoleDefault2 {} +export interface SyncthingConfigRoleIntroducer { + /** + * Auto accept incoming device requests. + * Should only be used on the introducer. + * + */ + autoAcceptDevices?: boolean; + /** + * Auto share the following Folders by their ID's with introduced devices. + * Should only be used on the introducer. + * + */ + autoShares?: string[]; + /** + * The ID of the machine. + * It is generated automatically by default. + * + */ + id?: null | string; + /** + * The introducer for the machine. + * + */ + introducer?: null | string; +} +export interface SyncthingConfigRolePeer { + /** + * Auto accept incoming device requests. + * Should only be used on the introducer. + * + */ + autoAcceptDevices?: boolean; + /** + * Auto share the following Folders by their ID's with introduced devices. + * Should only be used on the introducer. + * + */ + autoShares?: string[]; + /** + * The ID of the machine. + * It is generated automatically by default. + * + */ + id?: null | string; + /** + * The introducer for the machine. + * + */ + introducer?: null | string; +} +export interface SyncthingConfigRoleIntroducer1 { + /** + * Auto accept incoming device requests. + * Should only be used on the introducer. + * + */ + autoAcceptDevices?: boolean; + /** + * Auto share the following Folders by their ID's with introduced devices. + * Should only be used on the introducer. + * + */ + autoShares?: string[]; + /** + * The ID of the machine. + * It is generated automatically by default. + * + */ + id?: null | string; + /** + * The introducer for the machine. + * + */ + introducer?: null | string; +} +export interface SyncthingConfigRolePeer1 { + /** + * Auto accept incoming device requests. + * Should only be used on the introducer. + * + */ + autoAcceptDevices?: boolean; + /** + * Auto share the following Folders by their ID's with introduced devices. + * Should only be used on the introducer. + * + */ + autoShares?: string[]; + /** + * The ID of the machine. + * It is generated automatically by default. + * + */ + id?: null | string; + /** + * The introducer for the machine. + * + */ + introducer?: null | string; +} +export interface SyncthingRoles { + introducer?: { + config?: SyncthingConfigRoleIntroducer2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; + peer?: { + config?: SyncthingConfigRolePeer2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface SyncthingConfigRoleIntroducer2 { + /** + * Auto accept incoming device requests. + * Should only be used on the introducer. + * + */ + autoAcceptDevices?: boolean; + /** + * Auto share the following Folders by their ID's with introduced devices. + * Should only be used on the introducer. + * + */ + autoShares?: string[]; + /** + * The ID of the machine. + * It is generated automatically by default. + * + */ + id?: null | string; + /** + * The introducer for the machine. + * + */ + introducer?: null | string; +} +export interface SyncthingConfigRolePeer2 { + /** + * Auto accept incoming device requests. + * Should only be used on the introducer. + * + */ + autoAcceptDevices?: boolean; + /** + * Auto share the following Folders by their ID's with introduced devices. + * Should only be used on the introducer. + * + */ + autoShares?: string[]; + /** + * The ID of the machine. + * It is generated automatically by default. + * + */ + id?: null | string; + /** + * The introducer for the machine. + * + */ + introducer?: null | string; +} +export interface UserPasswordConfigRoleDefault { + /** + * Whether the user should be prompted + * If disabled, will autogenerate the password without prompting. + * + */ + prompt?: boolean; + /** + * The user the password should be generated for. + */ + user: string; +} +export interface UserPasswordConfigRoleDefault1 { + /** + * Whether the user should be prompted + * If disabled, will autogenerate the password without prompting. + * + */ + prompt?: boolean; + /** + * The user the password should be generated for. + */ + user: string; +} +export interface UserPasswordRoles { + default?: { + config?: UserPasswordConfigRoleDefault2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface UserPasswordConfigRoleDefault2 { + /** + * Whether the user should be prompted + * If disabled, will autogenerate the password without prompting. + * + */ + prompt?: boolean; + /** + * The user the password should be generated for. + */ + user: string; +} +export interface ZerotierConfigRoleController { + /** + * Hosts that should be excluded + */ + excludeHosts?: string[]; + /** + * Extra zerotier network Ids that should be accepted + */ + networkIds?: string[]; + /** + * Extra zerotier network Ips that should be accepted + */ + networkIps?: string[]; +} +export interface ZerotierConfigRoleMoon { + /** + * Hosts that should be excluded + */ + excludeHosts?: string[]; + moon: { + /** + * Make this machine a moon. + * Other machines can join this moon by adding this moon in their config. + * It will be reachable under the given stable endpoints. + * + */ + stableEndpoints: string[]; + }; + /** + * Extra zerotier network Ids that should be accepted + */ + networkIds?: string[]; + /** + * Extra zerotier network Ips that should be accepted + */ + networkIps?: string[]; +} +export interface ZerotierConfigRolePeer { + /** + * Hosts that should be excluded + */ + excludeHosts?: string[]; + /** + * Extra zerotier network Ids that should be accepted + */ + networkIds?: string[]; + /** + * Extra zerotier network Ips that should be accepted + */ + networkIps?: string[]; +} +export interface ZerotierConfigRoleController1 { + /** + * Hosts that should be excluded + */ + excludeHosts?: string[]; + /** + * Extra zerotier network Ids that should be accepted + */ + networkIds?: string[]; + /** + * Extra zerotier network Ips that should be accepted + */ + networkIps?: string[]; +} +export interface ZerotierConfigRoleMoon1 { + /** + * Hosts that should be excluded + */ + excludeHosts?: string[]; + moon: { + /** + * Make this machine a moon. + * Other machines can join this moon by adding this moon in their config. + * It will be reachable under the given stable endpoints. + * + */ + stableEndpoints: string[]; + }; + /** + * Extra zerotier network Ids that should be accepted + */ + networkIds?: string[]; + /** + * Extra zerotier network Ips that should be accepted + */ + networkIps?: string[]; +} +export interface ZerotierConfigRolePeer1 { + /** + * Hosts that should be excluded + */ + excludeHosts?: string[]; + /** + * Extra zerotier network Ids that should be accepted + */ + networkIds?: string[]; + /** + * Extra zerotier network Ips that should be accepted + */ + networkIps?: string[]; +} +export interface ZerotierRoles { + controller?: { + config?: ZerotierConfigRoleController2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; + moon?: { + config?: ZerotierConfigRoleMoon2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; + peer?: { + config?: ZerotierConfigRolePeer2; + /** + * List of additionally imported `.nix` expressions. + * + * Supported types: + * + * - **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`. + * - **Paths**: should be relative to the current file. + * - **Any**: Nix expression must be serializable to JSON. + * + * !!! Note + * **The import only happens if the machine is part of the service or role.** + * + * Other types are passed through to the nixos configuration. + * + * ???+ Example + * To import the `special.nix` file + * + * ``` + * . Clan Directory + * ├── flake.nix + * ... + * └── modules + * ├── special.nix + * └── ... + * ``` + * + * ```nix + * { + * extraModules = [ "modules/special.nix" ]; + * } + * ``` + * + */ + extraModules?: ( + | string + | ( + | boolean + | number + | string + | unknown[] + | { + [k: string]: unknown; + } + | null + ) + )[]; + /** + * List of machines which are part of the role. + * + * The machines are referenced by their `attributeName` in the `inventory.machines` attribute set. + * + * Memberships are declared here to determine which machines are part of the service. + * + * Alternatively, `tags` can be used to determine the membership, more dynamically. + * + */ + machines?: string[]; + /** + * List of tags which are used to determine the membership of the role. + * + * The tags are matched against the `inventory.machines..tags` attribute set. + * If a machine has at least one tag of the role, it is part of the role. + * + */ + tags?: string[]; + }; +} +export interface ZerotierConfigRoleController2 { + /** + * Hosts that should be excluded + */ + excludeHosts?: string[]; + /** + * Extra zerotier network Ids that should be accepted + */ + networkIds?: string[]; + /** + * Extra zerotier network Ips that should be accepted + */ + networkIps?: string[]; +} +export interface ZerotierConfigRoleMoon2 { + /** + * Hosts that should be excluded + */ + excludeHosts?: string[]; + moon: { + /** + * Make this machine a moon. + * Other machines can join this moon by adding this moon in their config. + * It will be reachable under the given stable endpoints. + * + */ + stableEndpoints: string[]; + }; + /** + * Extra zerotier network Ids that should be accepted + */ + networkIds?: string[]; + /** + * Extra zerotier network Ips that should be accepted + */ + networkIps?: string[]; +} +export interface ZerotierConfigRolePeer2 { + /** + * Hosts that should be excluded + */ + excludeHosts?: string[]; + /** + * Extra zerotier network Ids that should be accepted + */ + networkIds?: string[]; + /** + * Extra zerotier network Ips that should be accepted + */ + networkIps?: string[]; +} diff --git a/pkgs/clan-app/ui/src/components/MachineStatus/MachineStatus.css b/pkgs/clan-app/ui/src/components/MachineStatus/MachineStatus.css index a24ae0018..6024be9bd 100644 --- a/pkgs/clan-app/ui/src/components/MachineStatus/MachineStatus.css +++ b/pkgs/clan-app/ui/src/components/MachineStatus/MachineStatus.css @@ -1,5 +1,5 @@ span.machine-status { - @apply flex items-center gap-1; + @apply flex items-center gap-1.5; .indicator { @apply w-1.5 h-1.5 rounded-full m-1.5; @@ -13,7 +13,7 @@ span.machine-status { background-color: theme(colors.fg.semantic.error.1); } - &.installed > .indicator { + &.out-of-sync > .indicator { background-color: theme(colors.fg.inv.3); } } diff --git a/pkgs/clan-app/ui/src/components/MachineStatus/MachineStatus.stories.tsx b/pkgs/clan-app/ui/src/components/MachineStatus/MachineStatus.stories.tsx index 298533100..5d3e49884 100644 --- a/pkgs/clan-app/ui/src/components/MachineStatus/MachineStatus.stories.tsx +++ b/pkgs/clan-app/ui/src/components/MachineStatus/MachineStatus.stories.tsx @@ -20,27 +20,38 @@ export default meta; type Story = StoryObj; +export const Loading: Story = { + args: {}, +}; + export const Online: Story = { args: { - status: "Online", + status: "online", }, }; export const Offline: Story = { args: { - status: "Offline", + status: "offline", }, }; -export const Installed: Story = { +export const OutOfSync: Story = { args: { - status: "Installed", + status: "out_of_sync", }, }; export const NotInstalled: Story = { args: { - status: "Not Installed", + status: "not_installed", + }, +}; + +export const LoadingWithLabel: Story = { + args: { + ...Loading.args, + label: true, }, }; @@ -60,7 +71,7 @@ export const OfflineWithLabel: Story = { export const InstalledWithLabel: Story = { args: { - ...Installed.args, + ...OutOfSync.args, label: true, }, }; diff --git a/pkgs/clan-app/ui/src/components/MachineStatus/MachineStatus.tsx b/pkgs/clan-app/ui/src/components/MachineStatus/MachineStatus.tsx index 82e57b88e..22f8c1533 100644 --- a/pkgs/clan-app/ui/src/components/MachineStatus/MachineStatus.tsx +++ b/pkgs/clan-app/ui/src/components/MachineStatus/MachineStatus.tsx @@ -2,41 +2,58 @@ import "./MachineStatus.css"; import { Badge } from "@kobalte/core/badge"; import cx from "classnames"; -import { Show } from "solid-js"; +import { Match, Show, Switch } from "solid-js"; import Icon from "../Icon/Icon"; import { Typography } from "@/src/components/Typography/Typography"; - -export type MachineStatus = - | "Online" - | "Offline" - | "Installed" - | "Not Installed"; +import { MachineStatus as MachineStatusModel } from "@/src/hooks/queries"; +import { Loader } from "../Loader/Loader"; export interface MachineStatusProps { label?: boolean; - status: MachineStatus; + status?: MachineStatusModel; } -export const MachineStatus = (props: MachineStatusProps) => ( - - {props.label && ( - - {props.status} - - )} - } - > - - - -); +export const MachineStatus = (props: MachineStatusProps) => { + const status = () => props.status; + + // remove the '_' from the enum + // we will use css transform in the typography component to capitalize + const statusText = () => props.status?.replaceAll("_", " "); + + return ( + + + + + + + {props.label && ( + + {statusText()} + + )} + } + > +
+ + + + + ); +}; diff --git a/pkgs/clan-app/ui/src/components/Sidebar/Sidebar.css b/pkgs/clan-app/ui/src/components/Sidebar/Sidebar.module.css similarity index 54% rename from pkgs/clan-app/ui/src/components/Sidebar/Sidebar.css rename to pkgs/clan-app/ui/src/components/Sidebar/Sidebar.module.css index 2d19e39b9..5555e60ea 100644 --- a/pkgs/clan-app/ui/src/components/Sidebar/Sidebar.css +++ b/pkgs/clan-app/ui/src/components/Sidebar/Sidebar.module.css @@ -1,10 +1,7 @@ -div.sidebar { +.sidebar { @apply w-60 border-none z-10; - & > div.header { - } - - & > div.body { + .body { @apply pt-4 pb-3 px-2; } } diff --git a/pkgs/clan-app/ui/src/components/Sidebar/Sidebar.tsx b/pkgs/clan-app/ui/src/components/Sidebar/Sidebar.tsx index 475b94b50..b765a0d81 100644 --- a/pkgs/clan-app/ui/src/components/Sidebar/Sidebar.tsx +++ b/pkgs/clan-app/ui/src/components/Sidebar/Sidebar.tsx @@ -1,6 +1,7 @@ -import "./Sidebar.css"; +import styles from "./Sidebar.module.css"; import { SidebarHeader } from "@/src/components/Sidebar/SidebarHeader"; import { SidebarBody } from "@/src/components/Sidebar/SidebarBody"; +import cx from "classnames"; export interface LinkProps { path: string; @@ -13,16 +14,15 @@ export interface SectionProps { } export interface SidebarProps { + class?: string; staticSections?: SectionProps[]; } export const Sidebar = (props: SidebarProps) => { return ( - <> - - +
+ + +
); }; diff --git a/pkgs/clan-app/ui/src/components/Sidebar/SidebarBody.tsx b/pkgs/clan-app/ui/src/components/Sidebar/SidebarBody.tsx index 1175e0bea..7b7177472 100644 --- a/pkgs/clan-app/ui/src/components/Sidebar/SidebarBody.tsx +++ b/pkgs/clan-app/ui/src/components/Sidebar/SidebarBody.tsx @@ -6,47 +6,53 @@ import { Typography } from "@/src/components/Typography/Typography"; import { For } from "solid-js"; import { MachineStatus } from "@/src/components/MachineStatus/MachineStatus"; import { buildMachinePath, useClanURI } from "@/src/hooks/clan"; -import { useMachinesQuery } from "@/src/hooks/queries"; +import { useMachinesQuery, useMachineStateQuery } from "@/src/hooks/queries"; import { SidebarProps } from "./Sidebar"; interface MachineProps { clanURI: string; machineID: string; name: string; - status: MachineStatus; serviceCount: number; } -const MachineRoute = (props: MachineProps) => ( - -
- - -); + + ); +}; export const SidebarBody = (props: SidebarProps) => { const clanURI = useClanURI(); @@ -96,7 +102,6 @@ export const SidebarBody = (props: SidebarProps) => { clanURI={clanURI} machineID={id} name={machine.name || id} - status="Not Installed" serviceCount={0} /> )} diff --git a/pkgs/clan-app/ui/src/components/Sidebar/SidebarMachineStatus.module.css b/pkgs/clan-app/ui/src/components/Sidebar/SidebarMachineStatus.module.css new file mode 100644 index 000000000..c9c79ae78 --- /dev/null +++ b/pkgs/clan-app/ui/src/components/Sidebar/SidebarMachineStatus.module.css @@ -0,0 +1,7 @@ +.machineStatus { + @apply flex flex-col gap-2 w-full; + + .summary { + @apply flex flex-row justify-between items-center; + } +} diff --git a/pkgs/clan-app/ui/src/components/Sidebar/SidebarMachineStatus.tsx b/pkgs/clan-app/ui/src/components/Sidebar/SidebarMachineStatus.tsx new file mode 100644 index 000000000..5a9c3ff32 --- /dev/null +++ b/pkgs/clan-app/ui/src/components/Sidebar/SidebarMachineStatus.tsx @@ -0,0 +1,34 @@ +import styles from "./SidebarMachineStatus.module.css"; +import { Typography } from "@/src/components/Typography/Typography"; +import { useMachineStateQuery } from "@/src/hooks/queries"; +import { MachineStatus } from "@/src/components/MachineStatus/MachineStatus"; + +export interface SidebarMachineStatusProps { + class?: string; + clanURI: string; + machineName: string; +} + +export const SidebarMachineStatus = (props: SidebarMachineStatusProps) => { + const query = useMachineStateQuery(props.clanURI, props.machineName); + + return ( +
+
+ + Status + + +
+
+ ); +}; diff --git a/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.css b/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.css index d1a62ed42..797485eed 100644 --- a/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.css +++ b/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.css @@ -11,6 +11,7 @@ div.sidebar-pane { animation: sidebarPaneHide 250ms ease-out 300ms forwards; & > div.header > *, + & > div.sub-header > *, & > div.body > * { animation: sidebarFadeOut 250ms ease-out forwards; } @@ -35,6 +36,25 @@ div.sidebar-pane { } } + & > div.sub-header { + @apply px-3 py-1; + @apply border-b-[1px] border-b-bg-inv-4; + @apply border-r-[1px] border-r-bg-inv-3 border-l-[1px] border-l-bg-inv-3; + + background: + linear-gradient(0deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.08) 100%), + linear-gradient( + 90deg, + theme(colors.bg.inv.3) 0%, + theme(colors.bg.inv.4) 100% + ); + + & > * { + @apply opacity-0; + animation: sidebarFadeIn 250ms ease-in 250ms forwards; + } + } + & > div.body { @apply flex flex-col gap-4 px-2 pt-4 pb-3 w-full h-full; @apply backdrop-blur-md; diff --git a/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.tsx b/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.tsx index f43b3c433..91c000251 100644 --- a/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.tsx +++ b/pkgs/clan-app/ui/src/components/Sidebar/SidebarPane.tsx @@ -1,4 +1,4 @@ -import { createSignal, JSX, onMount } from "solid-js"; +import { createSignal, JSX, onMount, Show } from "solid-js"; import "./SidebarPane.css"; import { Typography } from "@/src/components/Typography/Typography"; import Icon from "../Icon/Icon"; @@ -6,8 +6,10 @@ import { Button as KButton } from "@kobalte/core/button"; import cx from "classnames"; export interface SidebarPaneProps { + class?: string; title: string; onClose: () => void; + subHeader?: () => JSX.Element; children: JSX.Element; } @@ -26,7 +28,12 @@ export const SidebarPane = (props: SidebarPaneProps) => { }); return ( -
+
{props.title} @@ -35,6 +42,9 @@ export const SidebarPane = (props: SidebarPaneProps) => {
+ +
{props.subHeader!()}
+
{props.children}
); diff --git a/pkgs/clan-app/ui/src/components/Sidebar/SidebarSectionInstall.module.css b/pkgs/clan-app/ui/src/components/Sidebar/SidebarSectionInstall.module.css new file mode 100644 index 000000000..d437e68dc --- /dev/null +++ b/pkgs/clan-app/ui/src/components/Sidebar/SidebarSectionInstall.module.css @@ -0,0 +1,3 @@ +.install { + @apply flex flex-col gap-4 w-full justify-center items-center; +} diff --git a/pkgs/clan-app/ui/src/components/Sidebar/SidebarSectionInstall.tsx b/pkgs/clan-app/ui/src/components/Sidebar/SidebarSectionInstall.tsx new file mode 100644 index 000000000..ad74f102e --- /dev/null +++ b/pkgs/clan-app/ui/src/components/Sidebar/SidebarSectionInstall.tsx @@ -0,0 +1,41 @@ +import { createSignal, Show } from "solid-js"; +import { Button } from "@/src/components/Button/Button"; +import { InstallModal } from "@/src/workflows/Install/install"; +import { useMachineName } from "@/src/hooks/clan"; +import { useMachineStateQuery } from "@/src/hooks/queries"; +import styles from "./SidebarSectionInstall.module.css"; +import { Alert } from "../Alert/Alert"; + +export interface SidebarSectionInstallProps { + clanURI: string; + machineName: string; +} + +export const SidebarSectionInstall = (props: SidebarSectionInstallProps) => { + const query = useMachineStateQuery(props.clanURI, props.machineName); + + const [showInstall, setShowModal] = createSignal(false); + + return ( + +
+ + + + setShowModal(false)} + /> + +
+
+ ); +}; diff --git a/pkgs/clan-app/ui/src/hooks/queries.ts b/pkgs/clan-app/ui/src/hooks/queries.ts index 5fcdb5eb5..8cb69d357 100644 --- a/pkgs/clan-app/ui/src/hooks/queries.ts +++ b/pkgs/clan-app/ui/src/hooks/queries.ts @@ -8,6 +8,10 @@ export type ClanDetailsWithURI = ClanDetails & { uri: string }; export type Tags = SuccessData<"list_tags">; export type Machine = SuccessData<"get_machine">; + +export type MachineState = SuccessData<"get_machine_state">; +export type MachineStatus = MachineState["status"]; + export type ListMachines = SuccessData<"list_machines">; export type MachineDetails = SuccessData<"get_machine_details">; @@ -94,6 +98,33 @@ export const useMachineQuery = (clanURI: string, machineName: string) => { })); }; +export const useMachineStateQuery = (clanURI: string, machineName: string) => { + const client = useApiClient(); + return useQuery(() => ({ + queryKey: ["clans", encodeBase64(clanURI), "machine", machineName, "state"], + refetchInterval: 1000 * 60, // poll every 60 seconds + queryFn: async () => { + const apiCall = client.fetch("get_machine_state", { + machine: { + name: machineName, + flake: { + identifier: clanURI, + }, + }, + }); + + const result = await apiCall.result; + if (result.status === "error") { + throw new Error( + "Error fetching machine status: " + result.errors[0].message, + ); + } + + return result.data; + }, + })); +}; + export const useMachineDetailsQuery = ( clanURI: string, machineName: string, diff --git a/pkgs/clan-app/ui/src/routes/Clan/Clan.css b/pkgs/clan-app/ui/src/routes/Clan/Clan.module.css similarity index 50% rename from pkgs/clan-app/ui/src/routes/Clan/Clan.css rename to pkgs/clan-app/ui/src/routes/Clan/Clan.module.css index b205e8873..03d5032c3 100644 --- a/pkgs/clan-app/ui/src/routes/Clan/Clan.css +++ b/pkgs/clan-app/ui/src/routes/Clan/Clan.module.css @@ -1,24 +1,20 @@ -.fade-out { +.fadeOut { opacity: 0; transition: opacity 0.5s ease; } -.create-backdrop { +.createBackdrop { @apply absolute top-0 left-0 w-full h-svh flex justify-center items-center backdrop-blur-0 z-50; -webkit-backdrop-filter: blur(4px); } -.create-modal { +.createModal { @apply min-w-96; } -.sidebar-container { -} +.sidebar { + @apply absolute left-4 top-10 w-60; + @apply min-h-96; -div.sidebar { - @apply absolute top-10 bottom-20 left-4 w-60; -} - -div.sidebar-pane { - @apply absolute top-12 bottom-20 left-[16.5rem] w-64; + height: calc(100vh - 8rem); } diff --git a/pkgs/clan-app/ui/src/routes/Clan/Clan.tsx b/pkgs/clan-app/ui/src/routes/Clan/Clan.tsx index e4d019e0a..196310b29 100644 --- a/pkgs/clan-app/ui/src/routes/Clan/Clan.tsx +++ b/pkgs/clan-app/ui/src/routes/Clan/Clan.tsx @@ -27,7 +27,7 @@ import { produce } from "solid-js/store"; import { Button } from "@/src/components/Button/Button"; import { Splash } from "@/src/scene/splash"; import cx from "classnames"; -import "./Clan.css"; +import styles from "./Clan.module.css"; import { Modal } from "@/src/components/Modal/Modal"; import { TextInput } from "@/src/components/Form/TextInput"; import { createForm, FieldValues, reset } from "@modular-forms/solid"; @@ -37,7 +37,7 @@ import { useNavigate } from "@solidjs/router"; export const Clan: Component = (props) => { return ( <> - + {props.children} @@ -59,7 +59,7 @@ const MockCreateMachine = (props: MockProps) => { const [form, { Form, Field, FieldArray }] = createForm(); return ( -
(container = el)} class="create-backdrop"> +
(container = el)} class={cx(styles.createBackdrop)}> { reset(form); props.onClose(); }} - class="create-modal" + class={cx(styles.createModal)} title="Create Machine" > {() => ( @@ -234,7 +234,7 @@ const ClanSceneController = (props: RouteSectionProps) => {
diff --git a/pkgs/clan-app/ui/src/routes/Machine/Machine.module.css b/pkgs/clan-app/ui/src/routes/Machine/Machine.module.css new file mode 100644 index 000000000..cade9f3cb --- /dev/null +++ b/pkgs/clan-app/ui/src/routes/Machine/Machine.module.css @@ -0,0 +1,6 @@ +.sidebarPane { + @apply absolute left-[16.5rem] top-12 w-64; + @apply min-h-96; + + height: calc(100vh - 10rem); +} diff --git a/pkgs/clan-app/ui/src/routes/Machine/Machine.tsx b/pkgs/clan-app/ui/src/routes/Machine/Machine.tsx index 271b6bc6c..9fff47a40 100644 --- a/pkgs/clan-app/ui/src/routes/Machine/Machine.tsx +++ b/pkgs/clan-app/ui/src/routes/Machine/Machine.tsx @@ -1,13 +1,16 @@ import { RouteSectionProps, useNavigate } from "@solidjs/router"; import { SidebarPane } from "@/src/components/Sidebar/SidebarPane"; import { navigateToClan, useClanURI, useMachineName } from "@/src/hooks/clan"; -import { createSignal, Show } from "solid-js"; +import { Show } from "solid-js"; import { SectionGeneral } from "./SectionGeneral"; -import { InstallModal } from "@/src/workflows/Install/install"; -import { Button } from "@/src/components/Button/Button"; import { Machine as MachineModel, useMachineQuery } from "@/src/hooks/queries"; import { SectionTags } from "@/src/routes/Machine/SectionTags"; import { callApi } from "@/src/hooks/api"; +import { SidebarMachineStatus } from "@/src/components/Sidebar/SidebarMachineStatus"; +import { SidebarSectionInstall } from "@/src/components/Sidebar/SidebarSectionInstall"; + +import cx from "classnames"; +import styles from "./Machine.module.css"; export const Machine = (props: RouteSectionProps) => { const navigate = useNavigate(); @@ -18,10 +21,6 @@ export const Machine = (props: RouteSectionProps) => { navigateToClan(navigate, clanURI); }; - const [showInstall, setShowModal] = createSignal(false); - - let container: Node; - const sidebarPane = (machineName: string) => { const machineQuery = useMachineQuery(clanURI, machineName); @@ -53,7 +52,15 @@ export const Machine = (props: RouteSectionProps) => { const sectionProps = { clanURI, machineName, onSubmit, machineQuery }; return ( - + ( + + )} + > + @@ -62,22 +69,6 @@ export const Machine = (props: RouteSectionProps) => { return ( - - {/* Unmount the whole component to destroy the store and form values */} - - setShowModal(false)} - /> - {sidebarPane(useMachineName())} ); diff --git a/pkgs/clan-app/ui/src/scene/cubes.css b/pkgs/clan-app/ui/src/scene/cubes.css index f2fa7ae2e..9be825105 100644 --- a/pkgs/clan-app/ui/src/scene/cubes.css +++ b/pkgs/clan-app/ui/src/scene/cubes.css @@ -5,7 +5,7 @@ } .toolbar-container { - @apply absolute bottom-8 z-10 w-full; + @apply absolute bottom-10 z-10 w-full; @apply flex justify-center items-center; } diff --git a/pkgs/clan-cli/clan_cli/nixpkgs b/pkgs/clan-cli/clan_cli/nixpkgs index 917ef9505..ed8e556bd 120000 --- a/pkgs/clan-cli/clan_cli/nixpkgs +++ b/pkgs/clan-cli/clan_cli/nixpkgs @@ -1 +1 @@ -/nix/store/q012qk78pwldxl3qjy09nwrx9jlamivm-nixpkgs \ No newline at end of file +/nix/store/apspgd56g9qy6fca8d44qnhdaiqrdf2c-nixpkgs \ No newline at end of file diff --git a/pkgs/clan-cli/clan_lib/machines/actions.py b/pkgs/clan-cli/clan_lib/machines/actions.py index 5e5e92126..c24c702f4 100644 --- a/pkgs/clan-cli/clan_lib/machines/actions.py +++ b/pkgs/clan-cli/clan_lib/machines/actions.py @@ -1,3 +1,4 @@ +from enum import StrEnum from typing import TypedDict from clan_lib.api import API @@ -25,6 +26,18 @@ class ListOptions(TypedDict): filter: MachineFilter +class MachineStatus(StrEnum): + NOT_INSTALLED = "not_installed" + OFFLINE = "offline" + OUT_OF_SYNC = "out_of_sync" + ONLINE = "online" + + +class MachineState(TypedDict): + status: MachineStatus + # add more info later when retrieving remote state + + @API.register def list_machines( flake: Flake, opts: ListOptions | None = None @@ -154,3 +167,47 @@ def get_machine_fields_schema(machine: Machine) -> dict[str, FieldSchema]: } for field in field_names } + + +@API.register +def list_machine_state(flake: Flake) -> dict[str, MachineState]: + """ + Retrieve the current state of all machines in the clan. + + Args: + flake (Flake): The flake object representing the configuration source. + """ + inventory_store = InventoryStore(flake=flake) + inventory = inventory_store.read() + + # todo integrate with remote state when implementing https://git.clan.lol/clan/clan-core/issues/4748 + machines = inventory.get("machines", {}) + + return { + machine_name: MachineState( + status=MachineStatus.OFFLINE + if get_value_by_path(machine, "installedAt", None) + else MachineStatus.NOT_INSTALLED + ) + for machine_name, machine in machines.items() + } + + +@API.register +def get_machine_state(machine: Machine) -> MachineState: + """ + Retrieve the current state of the machine. + + Args: + machine (Machine): The machine object for which we want to retrieve the latest state. + """ + inventory_store = InventoryStore(flake=machine.flake) + inventory = inventory_store.read() + + # todo integrate with remote state when implementing https://git.clan.lol/clan/clan-core/issues/4748 + + return MachineState( + status=MachineStatus.OFFLINE + if get_value_by_path(inventory, f"machines.{machine.name}.installedAt", None) + else MachineStatus.NOT_INSTALLED + ) diff --git a/pkgs/clan-cli/clan_lib/machines/actions_test.py b/pkgs/clan-cli/clan_lib/machines/actions_test.py index 11e4471a6..9e049df16 100644 --- a/pkgs/clan-cli/clan_lib/machines/actions_test.py +++ b/pkgs/clan-cli/clan_lib/machines/actions_test.py @@ -1,3 +1,4 @@ +import time from collections.abc import Callable from typing import cast from unittest.mock import ANY, patch @@ -12,7 +13,16 @@ from clan_lib.nix_models.clan import Clan, InventoryMachine, Unknown from clan_lib.persist.inventory_store import InventoryStore from clan_lib.persist.util import get_value_by_path, set_value_by_path -from .actions import get_machine, get_machine_fields_schema, list_machines, set_machine +from .actions import ( + MachineState, + MachineStatus, + get_machine, + get_machine_fields_schema, + get_machine_state, + list_machine_state, + list_machines, + set_machine, +) @pytest.mark.with_core @@ -219,7 +229,44 @@ def test_get_machine_writeability(clan_flake: Callable[..., Flake]) -> None: "deploy.buildHost", "description", "icon", + "installedAt", } assert read_only_fields == {"machineClass", "name"} assert write_info["tags"]["readonly_members"] == ["nix1", "all", "nixos"] + + +@pytest.mark.with_core +def test_machine_state(clan_flake: Callable[..., Flake]) -> None: + now = int(time.time()) + yesterday = now - 86400 + last_week = now - 604800 + + flake = clan_flake( + # clan.nix, cannot be changed + clan={ + "inventory": { + "machines": { + "jon": {}, + "sara": {"installedAt": yesterday}, + "bob": {"installedAt": last_week}, + }, + } + }, + ) + + assert list_machine_state(flake) == { + "jon": MachineState(status=MachineStatus.NOT_INSTALLED), + "sara": MachineState(status=MachineStatus.OFFLINE), + "bob": MachineState(status=MachineStatus.OFFLINE), + } + + assert get_machine_state(Machine("jon", flake)) == MachineState( + status=MachineStatus.NOT_INSTALLED + ) + assert get_machine_state(Machine("sara", flake)) == MachineState( + status=MachineStatus.OFFLINE + ) + assert get_machine_state(Machine("bob", flake)) == MachineState( + status=MachineStatus.OFFLINE + ) diff --git a/pkgs/clan-cli/clan_lib/nix_models/clan.py b/pkgs/clan-cli/clan_lib/nix_models/clan.py index 48cdbb991..ca542af05 100644 --- a/pkgs/clan-cli/clan_lib/nix_models/clan.py +++ b/pkgs/clan-cli/clan_lib/nix_models/clan.py @@ -72,6 +72,7 @@ class InventoryMachineDeploy(TypedDict): InventoryMachineDeployType = InventoryMachineDeploy InventoryMachineDescriptionType = str | None InventoryMachineIconType = str | None +InventoryMachineInstalledatType = int | None InventoryMachineMachineclassType = Literal["nixos", "darwin"] InventoryMachineNameType = str InventoryMachineTagsType = list[str] @@ -80,6 +81,7 @@ class InventoryMachine(TypedDict): deploy: NotRequired[InventoryMachineDeployType] description: NotRequired[InventoryMachineDescriptionType] icon: NotRequired[InventoryMachineIconType] + installedAt: NotRequired[InventoryMachineInstalledatType] machineClass: NotRequired[InventoryMachineMachineclassType] name: NotRequired[InventoryMachineNameType] tags: NotRequired[InventoryMachineTagsType]