mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-12 18:01:59 +01:00
4a29b6d8d3
Signed-off-by: magic_rb <magic_rb@redalder.org>
70 lines
1.3 KiB
HCL
70 lines
1.3 KiB
HCL
variable "flake_ref" {
|
|
type = string
|
|
}
|
|
|
|
variable "flake_sha" {
|
|
type = string
|
|
}
|
|
|
|
variable "store_path" {
|
|
type = string
|
|
}
|
|
|
|
job "minecraft-enigmatica6" {
|
|
datacenters = [ "homelab-1" ]
|
|
type = "service"
|
|
|
|
group "minecraft-enigmatica6" {
|
|
count = 1
|
|
|
|
volume "minecraft-enigmatica6" {
|
|
type = "csi"
|
|
source = "minecraft-enigmatica6"
|
|
read_only = false
|
|
|
|
attachment_mode = "file-system"
|
|
access_mode = "single-node-writer"
|
|
}
|
|
|
|
network {
|
|
mode = "bridge"
|
|
port "minecraft" {
|
|
static = 25560
|
|
to = 25565
|
|
}
|
|
port "minecraft-wan" {
|
|
host_network = "wan"
|
|
static = 25560
|
|
to = 25565
|
|
}
|
|
}
|
|
|
|
|
|
task "minecraft-enigmatica6" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
nix_flake_ref = "${var.flake_ref}#nixngConfigurations.minecraft-enigmatica-6.config.system.build.toplevel"
|
|
nix_flake_sha = var.flake_sha
|
|
nix_flake_store_path = var.store_path
|
|
entrypoint = [ "init" ]
|
|
|
|
ports = ["minecraft", "minecraft-wan"]
|
|
}
|
|
|
|
kill_signal = "SIGHUP"
|
|
|
|
resources {
|
|
cpu = 8192
|
|
memory = 8192
|
|
memory_max = 10240
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "minecraft-enigmatica6"
|
|
destination = "/var/lib/minecraft/curseforge"
|
|
read_only = false
|
|
}
|
|
}
|
|
}
|
|
}
|