Allow local deployment
This commit is contained in:
parent
32771cf392
commit
dacc41068b
2 changed files with 12 additions and 3 deletions
12
flake.nix
12
flake.nix
|
@ -72,8 +72,16 @@
|
||||||
# Setup colmena configurations
|
# Setup colmena configurations
|
||||||
colmena = utils.createColmenaHive {
|
colmena = utils.createColmenaHive {
|
||||||
hostConfigs = [
|
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";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -63,10 +63,11 @@
|
||||||
acc // {
|
acc // {
|
||||||
${cur.name} = { ... }: {
|
${cur.name} = { ... }: {
|
||||||
deployment = {
|
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";
|
targetUser = if (builtins.hasAttr "sshUser" cur) then cur.sshUser else "root";
|
||||||
targetHost = if (builtins.hasAttr "sshHost" cur) then cur.sshHost else cur.name;
|
targetHost = if (builtins.hasAttr "sshHost" cur) then cur.sshHost else cur.name;
|
||||||
targetPort = if (builtins.hasAttr "sshPort" cur) then cur.sshPort else 22;
|
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 ];
|
imports = [ cur.entrypoint ];
|
||||||
|
|
Loading…
Reference in a new issue