dotfiles/terranix/containers/ingress-toothpick/default.nix
Magic_RB 449e73fdba
Update ingressToothpick to new Nix integration
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2023-07-10 23:37:54 +02:00

26 lines
740 B
Nix

{ elib, secret, vars, config', ... }:
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;
store_path = config'.flake.nixngConfigurations.ingressToothpick.config.system.build.toplevel;
upstreams = "\${file(\"${./upstreams.conf}\")}";
};
};
}