Merge pull request 'inventory: Add buildHost argument' (#3817) from Qubasa/clan-core:minimized into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3817
This commit is contained in:
@@ -50,7 +50,10 @@ let
|
|||||||
{
|
{
|
||||||
machineImports = [
|
machineImports = [
|
||||||
(lib.optionalAttrs (machineConfig.deploy.targetHost or null != null) {
|
(lib.optionalAttrs (machineConfig.deploy.targetHost or null != null) {
|
||||||
config.clan.core.networking.targetHost = machineConfig.deploy.targetHost;
|
config.clan.core.networking.targetHost = lib.mkForce machineConfig.deploy.targetHost;
|
||||||
|
})
|
||||||
|
(lib.optionalAttrs (machineConfig.deploy.buildHost or null != null) {
|
||||||
|
config.clan.core.networking.buildHost = lib.mkForce machineConfig.deploy.buildHost;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
assertions = { };
|
assertions = { };
|
||||||
|
|||||||
@@ -347,7 +347,12 @@ in
|
|||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
};
|
};
|
||||||
deploy.targetHost = lib.mkOption {
|
deploy.targetHost = lib.mkOption {
|
||||||
description = "Configuration for the deployment of the machine";
|
description = "SSH address of the host to deploy the machine to";
|
||||||
|
default = null;
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
};
|
||||||
|
deploy.buildHost = lib.mkOption {
|
||||||
|
description = "SSH address of the host to build the machine on";
|
||||||
default = null;
|
default = null;
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -58,9 +58,11 @@ class InventoryInstance(TypedDict):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
InventoryMachineDeployBuildhostType = str | None
|
||||||
InventoryMachineDeployTargethostType = str | None
|
InventoryMachineDeployTargethostType = str | None
|
||||||
|
|
||||||
class InventoryMachineDeploy(TypedDict):
|
class InventoryMachineDeploy(TypedDict):
|
||||||
|
buildHost: NotRequired[InventoryMachineDeployBuildhostType]
|
||||||
targetHost: NotRequired[InventoryMachineDeployTargethostType]
|
targetHost: NotRequired[InventoryMachineDeployTargethostType]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,9 +58,11 @@ class Instance(TypedDict):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
MachineDeployBuildhostType = str
|
||||||
MachineDeployTargethostType = str
|
MachineDeployTargethostType = str
|
||||||
|
|
||||||
class MachineDeploy(TypedDict):
|
class MachineDeploy(TypedDict):
|
||||||
|
buildHost: NotRequired[MachineDeployBuildhostType]
|
||||||
targetHost: NotRequired[MachineDeployTargethostType]
|
targetHost: NotRequired[MachineDeployTargethostType]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user