mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-27 02:26:14 +01:00
30 lines
679 B
Nix
30 lines
679 B
Nix
|
{ elib, secret, ... }:
|
||
|
let
|
||
|
inherit (elib)
|
||
|
nfsVolume
|
||
|
nomadJob;
|
||
|
|
||
|
flake_host = "";
|
||
|
flake_rev = "";
|
||
|
flake_ref = "";
|
||
|
flake_sha = "";
|
||
|
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 = "${flake_host}?rev=${flake_rev}&ref=${flake_ref}";
|
||
|
flake_sha = flake_sha;
|
||
|
upstreams = "\${file(\"${./upstreams.conf}\")}";
|
||
|
};
|
||
|
};
|
||
|
}
|