2023-06-15 23:06:47 +02:00
|
|
|
{
|
2024-03-02 22:05:30 +01:00
|
|
|
elib,
|
2024-04-06 16:15:47 +02:00
|
|
|
tflib,
|
2024-03-02 22:05:30 +01:00
|
|
|
secret,
|
|
|
|
vars,
|
|
|
|
config',
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit
|
|
|
|
(elib)
|
|
|
|
nfsVolume
|
|
|
|
nomadJob
|
|
|
|
;
|
2024-04-06 16:15:47 +02:00
|
|
|
inherit
|
|
|
|
(tflib)
|
|
|
|
tf
|
|
|
|
;
|
2024-03-02 22:05:30 +01:00
|
|
|
in {
|
2024-02-11 12:29:34 +01:00
|
|
|
terraform.required_providers = {
|
|
|
|
nomad = {
|
2024-03-02 22:05:30 +01:00
|
|
|
source = "hashicorp/nomad";
|
|
|
|
configuration_aliases = ["nomad.do-1"];
|
2024-02-11 12:29:34 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-06-15 23:06:47 +02:00
|
|
|
resource."nomad_volume"."ingress-letsencrypt" = nfsVolume {
|
2024-02-11 12:29:34 +01:00
|
|
|
provider = "nomad.do-1";
|
2023-06-15 23:06:47 +02:00
|
|
|
volume_name = "ingress-letsencrypt";
|
|
|
|
access_mode = "single-node-writer";
|
2023-11-19 12:33:11 +01:00
|
|
|
server = secret.network.ips.blowhole.ip or "";
|
2024-01-11 10:20:05 +01:00
|
|
|
share = "/mnt/kyle/infrastructure/ingress-toothpick/letsencrypt";
|
2024-03-02 22:05:30 +01:00
|
|
|
mount_flags = ["nolock" "hard"];
|
2023-06-15 23:06:47 +02:00
|
|
|
};
|
|
|
|
|
2024-04-06 16:15:47 +02:00
|
|
|
imports = [
|
|
|
|
(elib.buildNixNGSystem {
|
|
|
|
name = "ingressToothpick";
|
2024-04-06 16:40:33 +02:00
|
|
|
hosts = [
|
|
|
|
"toothpick.hosts.in.redalder.org"
|
|
|
|
];
|
2024-04-06 16:15:47 +02:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-06-15 23:06:47 +02:00
|
|
|
resource."nomad_job"."ingress" = nomadJob {
|
|
|
|
jobspec = ./job.hcl;
|
|
|
|
vars = {
|
2024-04-06 16:40:33 +02:00
|
|
|
flake_ref = "unused";
|
|
|
|
flake_sha = "unused";
|
2024-04-06 16:15:47 +02:00
|
|
|
store_path = tf "data.external.nixng-system-ingressToothpick.result.out";
|
2023-06-15 23:06:47 +02:00
|
|
|
upstreams = "\${file(\"${./upstreams.conf}\")}";
|
|
|
|
};
|
2024-04-06 16:15:47 +02:00
|
|
|
|
|
|
|
depends_on = [
|
|
|
|
"terraform_data.nixng-system-ingressToothpick-copy"
|
|
|
|
];
|
2023-06-15 23:06:47 +02:00
|
|
|
};
|
|
|
|
}
|