dotfiles/terranix/containers/minecraft/vanilla/default.nix
Magic_RB 5d516e080b Add new Minecraft modules and containers
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2023-07-19 00:37:47 +02:00

24 lines
748 B
Nix

{ config', pkgs, elib, vars, ... }:
let
inherit (elib)
nfsVolume
nomadJob;
in
{
resource."nomad_volume"."minecraft-vanilla" = nfsVolume {
access_mode = "single-node-writer";
volume_name = "minecraft-vanilla";
server = "blowhole.hosts.in.redalder.org";
share = "/mnt/kyle/infrastructure/minecraft/vanilla";
mount_flags = [ "hard" "vers=4.2" "rsize=131072" "wsize=131072" "async" ];
};
resource."nomad_job"."minecraft-vanilla" = 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.minecraft-vanilla.config.system.build.toplevel;
};
};
}