2023-07-10 23:37:54 +02:00
|
|
|
{ elib, secret, vars, config', ... }:
|
2023-06-15 23:06:47 +02:00
|
|
|
let
|
|
|
|
inherit (elib)
|
|
|
|
nfsVolume
|
|
|
|
nomadJob;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
resource."nomad_volume"."ingress-letsencrypt" = nfsVolume {
|
|
|
|
volume_name = "ingress-letsencrypt";
|
|
|
|
access_mode = "single-node-writer";
|
|
|
|
server = secret.network.ips.blowhole.ip;
|
|
|
|
share = "/var/nfs/ingress-letsencrypt";
|
|
|
|
mount_flags = [ "nolock" "hard" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
resource."nomad_job"."ingress" = nomadJob {
|
|
|
|
jobspec = ./job.hcl;
|
|
|
|
vars = {
|
2023-06-19 00:41:49 +02:00
|
|
|
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
|
|
|
|
flake_sha = vars.flake_sha;
|
2023-07-10 23:37:54 +02:00
|
|
|
store_path = config'.flake.nixngConfigurations.ingressToothpick.config.system.build.toplevel;
|
2023-06-15 23:06:47 +02:00
|
|
|
upstreams = "\${file(\"${./upstreams.conf}\")}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|