mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
logic fixed for deploy targetName resolution
This commit is contained in:
parent
31857ea95b
commit
ca816adbf3
1 changed files with 5 additions and 4 deletions
|
|
@ -53,10 +53,11 @@ in
|
|||
config = {
|
||||
deploy = {
|
||||
system = config.system.build.toplevel;
|
||||
targetName = if (meta.deploy.targets ? ${name}) then
|
||||
(mkDefault name)
|
||||
else
|
||||
head (attrNames ((filterAttrs(targetName: target: elem config.networking.hostName target.nodeNames) meta.deploy.targets)));
|
||||
targetName = let
|
||||
explicitlyDefinedHosts = concatLists (mapAttrsToList (targetName: target: remove targetName target.nodeNames) meta.deploy.targets);
|
||||
in if (meta.deploy.targets.${config.networking.hostName}.enable) then
|
||||
config.networking.hostName
|
||||
else (head (attrNames (filterAttrs (n: v: n != config.networking.hostName && (elem config.networking.hostName v.nodeNames)) meta.deploy.targets)));
|
||||
};
|
||||
deploy.tf = mkMerge (singleton
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue