mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-27 02:26:14 +01:00
0d4698ab78
Signed-off-by: Magic_RB <magic_rb@redalder.org>
28 lines
717 B
Nix
28 lines
717 B
Nix
{ tflib, elib, secret, vars, ... }:
|
|
let
|
|
inherit (elib)
|
|
nfsVolume
|
|
nomadJob;
|
|
inherit (tflib)
|
|
tf;
|
|
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 {
|
|
count = tf "var.dont_deploy_containers ? 0 : 1";
|
|
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}\")}";
|
|
};
|
|
};
|
|
}
|