Allow local deployment

This commit is contained in:
Tyler Beckman 2024-12-15 23:45:19 -07:00
parent 32771cf392
commit dacc41068b
Signed by: Ty
GPG key ID: 2813440C772555A4
2 changed files with 12 additions and 3 deletions

View file

@ -72,8 +72,16 @@
# Setup colmena configurations
colmena = utils.createColmenaHive {
hostConfigs = [
{ name = "ty-nixos"; entrypoint = ./hosts/laptop; }
{ name = "ty-laptop-server"; entrypoint = ./hosts/laptop-server; sshHost = "old-lenovo-laptop"; }
{
name = "ty-nixos";
entrypoint = ./hosts/laptop;
allowLocal = true;
}
{
name = "ty-laptop-server";
entrypoint = ./hosts/laptop-server;
sshHost = "old-lenovo-laptop";
}
];
};

View file

@ -63,10 +63,11 @@
acc // {
${cur.name} = { ... }: {
deployment = {
replaceUnknownProfiles = false;
replaceUnknownProfiles = if (builtins.hasAttr "allowLocal" cur) then cur.allowLocal else false;
targetUser = if (builtins.hasAttr "sshUser" cur) then cur.sshUser else "root";
targetHost = if (builtins.hasAttr "sshHost" cur) then cur.sshHost else cur.name;
targetPort = if (builtins.hasAttr "sshPort" cur) then cur.sshPort else 22;
allowLocalDeployment = if (builtins.hasAttr "allowLocal" cur) then cur.allowLocal else false;
};
imports = [ cur.entrypoint ];