refactor(deploy): set up tailnet 'colmena' deploy

This commit is contained in:
2026-06-15 08:35:49 +02:00
parent e845834833
commit c19d6b3152
8 changed files with 11 additions and 16 deletions
+1 -7
View File
@@ -19,14 +19,11 @@ let
colmena = inputs.colmena.packages.${pkgs.stdenv.hostPlatform.system}.colmena;
hostTags = hostname: (myUtils.hostMeta (hostDir + "/${hostname}")).tags;
remoteHostsWithKeys = lib.filter (
hostname: !(builtins.elem "local" (hostTags hostname))
) hostsWithKeys;
nodeTagsDecl = ''
declare -A _colmena_node_tags=(
${lib.concatMapStringsSep "\n" (
hostname: " [${hostname}]=${lib.escapeShellArg (lib.concatStringsSep " " (hostTags hostname))}"
) remoteHostsWithKeys}
) hostsWithKeys}
)
'';
@@ -56,12 +53,9 @@ in
hostname:
let
meta = myUtils.hostMeta (hostDir + "/${hostname}");
isLocal = builtins.elem "local" meta.tags;
in
{
User = meta.host.username;
}
// lib.optionalAttrs (!isLocal) {
HostName = hostname;
ControlPath = "~/.ssh/socket-%r@%h:%p";
}