fix(deploy): add 'host.name' to colmena config
This commit is contained in:
@@ -6,17 +6,18 @@
|
|||||||
let
|
let
|
||||||
inherit (inputs.nixpkgs) lib;
|
inherit (inputs.nixpkgs) lib;
|
||||||
utils = import ../utils { inherit lib; };
|
utils = import ../utils { inherit lib; };
|
||||||
hostDirNames = utils.dirNames ../hosts;
|
hostnames = utils.dirNames ../hosts;
|
||||||
|
|
||||||
mkNode = hostname: meta: {
|
mkNode = hostname: meta: {
|
||||||
imports = [ ../hosts/${hostname} ];
|
imports = [ ../hosts/${hostname} ];
|
||||||
|
host.name = hostname;
|
||||||
deployment = {
|
deployment = {
|
||||||
inherit (meta.deployment) targetHost targetUser tags;
|
inherit (meta.deployment) targetHost targetUser tags;
|
||||||
buildOnTarget = builtins.any (t: t != "local" && t != "arm") meta.deployment.tags;
|
buildOnTarget = builtins.any (t: t != "local" && t != "arm") meta.deployment.tags;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = lib.genAttrs hostDirNames (hostname: mkNode hostname (utils.hostMeta ../hosts/${hostname}));
|
nodes = lib.genAttrs hostnames (hostname: mkNode hostname (utils.hostMeta ../hosts/${hostname}));
|
||||||
in
|
in
|
||||||
inputs.colmena.lib.makeHive (
|
inputs.colmena.lib.makeHive (
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user