mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
modules/nixos/tf-glue: Automatic per-host deploy settings
This commit is contained in:
parent
93a341b16f
commit
9b122408c0
6 changed files with 11 additions and 30 deletions
|
|
@ -90,15 +90,11 @@ with config.resources; {
|
|||
# cname.target = "athame.kittywit.ch.";
|
||||
#};
|
||||
|
||||
deploy.systems.athame = {
|
||||
nixosConfig = hosts.athame.config;
|
||||
connection = athame.connection.set;
|
||||
# connection = {
|
||||
# host = athame.refAttr "ipv4_address";
|
||||
# port = 62954;
|
||||
# };
|
||||
triggers.copy.athame = athame.refAttr "id";
|
||||
triggers.secrets.athame = athame.refAttr "id";
|
||||
|
||||
#triggers.switch = lib.mapAttrs (name: record:
|
||||
# {
|
||||
# A = config.lib.tf.terraformExpr
|
||||
|
|
@ -108,5 +104,5 @@ with config.resources; {
|
|||
# CNAME = record.out.resource.refAttr "cname";
|
||||
# SRV = record.out.resource.refAttr "id";
|
||||
# }.${record.out.type}) config.dns.records;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,5 @@
|
|||
host = "192.168.1.119";
|
||||
};
|
||||
};
|
||||
deploy.systems.mabon = with config.resources; {
|
||||
nixosConfig = hosts.mabon.config;
|
||||
connection = mabon.connection.set;
|
||||
triggers.copy.mabon = mabon.refAttr "id";
|
||||
triggers.secrets.mabon = mabon.refAttr "id";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,5 @@
|
|||
host = "192.168.1.245";
|
||||
};
|
||||
};
|
||||
deploy.systems.ostara = with config.resources; {
|
||||
nixosConfig = hosts.ostara.config;
|
||||
connection = ostara.connection.set;
|
||||
triggers.copy.ostara = ostara.refAttr "id";
|
||||
triggers.secrets.ostara = ostara.refAttr "id";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,5 @@
|
|||
host = "192.168.1.135";
|
||||
};
|
||||
};
|
||||
deploy.systems.samhain = with config.resources; {
|
||||
nixosConfig = hosts.samhain.config;
|
||||
connection = samhain.connection.set;
|
||||
triggers.copy.samhain = samhain.refAttr "id";
|
||||
triggers.secrets.samhain = samhain.refAttr "id";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,5 @@
|
|||
host = "192.168.1.92";
|
||||
};
|
||||
};
|
||||
deploy.systems.yule = with config.resources; {
|
||||
nixosConfig = hosts.yule.config;
|
||||
connection = yule.connection.set;
|
||||
triggers.copy.yule = yule.refAttr "id";
|
||||
triggers.secrets.yule = yule.refAttr "id";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,15 @@ in {
|
|||
attrs = [ "out" "attrs" ];
|
||||
out.set = removeAttrs cfg cfg.attrs;
|
||||
};
|
||||
|
||||
deploy.tf.deploy.systems."${config.networking.hostName}" = with tf.resources; {
|
||||
isRemote = false;
|
||||
nixosConfig = config;
|
||||
connection = tf.resources.${config.networking.hostName}.connection.set;
|
||||
triggers.copy."${config.networking.hostName}" = tf.resources.${config.networking.hostName}.refAttr "id";
|
||||
triggers.secrets."${config.networking.hostName}" = tf.resources.${config.networking.hostName}.refAttr "id";
|
||||
};
|
||||
|
||||
deploy.tf.dns.records."kittywitch_net_${config.networking.hostName}" =
|
||||
mkIf (config.hexchen.network.enable) {
|
||||
tld = "kittywit.ch.";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue