mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-04 22:14:58 +01:00
4a29b6d8d3
Signed-off-by: magic_rb <magic_rb@redalder.org>
69 lines
1.2 KiB
HCL
69 lines
1.2 KiB
HCL
variable "flake_ref" {
|
|
type = string
|
|
}
|
|
|
|
variable "flake_sha" {
|
|
type = string
|
|
}
|
|
|
|
variable "store_path" {
|
|
type = string
|
|
}
|
|
|
|
job "matrix-heisenbridge" {
|
|
datacenters = [ "homelab-1" ]
|
|
type = "service"
|
|
|
|
group "heisenbridge" {
|
|
count = 1
|
|
|
|
volume "matrix-registrations" {
|
|
type = "csi"
|
|
source = "matrix-registrations"
|
|
read_only = false
|
|
|
|
attachment_mode = "file-system"
|
|
access_mode = "multi-node-multi-writer"
|
|
}
|
|
|
|
restart {
|
|
attempts = 5
|
|
delay = "5s"
|
|
}
|
|
|
|
network {
|
|
mode = "bridge"
|
|
}
|
|
|
|
service {
|
|
name = "matrix-heisenbridge"
|
|
port = "9898"
|
|
|
|
connect {
|
|
sidecar_service {}
|
|
}
|
|
}
|
|
|
|
task "heisenbridge" {
|
|
driver = "docker"
|
|
|
|
volume_mount {
|
|
volume = "matrix-registrations"
|
|
destination = "/var/lib/registrations"
|
|
read_only = false
|
|
}
|
|
|
|
config {
|
|
nix_flake_ref = "${var.flake_ref}#nixngConfigurations.heisenbridge.config.system.build.toplevel"
|
|
nix_flake_sha = var.flake_sha
|
|
nix_flake_store_path = var.store_path
|
|
entrypoint = [ "init" ]
|
|
}
|
|
|
|
resources {
|
|
cpu = 128
|
|
memory = 128
|
|
}
|
|
}
|
|
}
|
|
}
|