drop "system" argument from inventory
This commit is contained in:
@@ -12,8 +12,7 @@
|
|||||||
},
|
},
|
||||||
"description": "A nice thing",
|
"description": "A nice thing",
|
||||||
"icon": "./path/to/icon.png",
|
"icon": "./path/to/icon.png",
|
||||||
"tags": ["1", "2", "3"],
|
"tags": ["1", "2", "3"]
|
||||||
"system": "x86_64-linux"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"services": {
|
"services": {
|
||||||
|
|||||||
@@ -154,9 +154,6 @@ let
|
|||||||
) [ ] inventory.services
|
) [ ] inventory.services
|
||||||
# Append each machine config
|
# Append each machine config
|
||||||
++ [
|
++ [
|
||||||
(lib.optionalAttrs (machineConfig.system or null != null) {
|
|
||||||
config.nixpkgs.hostPlatform = machineConfig.system;
|
|
||||||
})
|
|
||||||
(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 = machineConfig.deploy.targetHost;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -142,10 +142,6 @@ in
|
|||||||
apply = lib.unique;
|
apply = lib.unique;
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
};
|
};
|
||||||
system = lib.mkOption {
|
|
||||||
default = null;
|
|
||||||
type = types.nullOr types.str;
|
|
||||||
};
|
|
||||||
deploy.targetHost = lib.mkOption {
|
deploy.targetHost = lib.mkOption {
|
||||||
description = "Configuration for the deployment of the machine";
|
description = "Configuration for the deployment of the machine";
|
||||||
default = null;
|
default = null;
|
||||||
|
|||||||
@@ -55,9 +55,7 @@ def test_add_module_to_inventory(
|
|||||||
)
|
)
|
||||||
opts = CreateOptions(
|
opts = CreateOptions(
|
||||||
clan_dir=FlakeId(str(base_path)),
|
clan_dir=FlakeId(str(base_path)),
|
||||||
machine=Machine(
|
machine=Machine(name="machine1", tags=[], deploy=MachineDeploy()),
|
||||||
name="machine1", tags=[], system="x86_64-linux", deploy=MachineDeploy()
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
create_machine(opts)
|
create_machine(opts)
|
||||||
|
|||||||
Reference in New Issue
Block a user