dotfiles/terranix/containers/ingress-toothpick/default.nix

25 lines
631 B
Nix
Raw Normal View History

{ elib, secret, vars, ... }:
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 = {
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
flake_sha = vars.flake_sha;
upstreams = "\${file(\"${./upstreams.conf}\")}";
};
};
}