Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2022-09-20 00:36:50 +02:00
parent e7216e601a
commit a27a4c4e78
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
13 changed files with 412 additions and 105 deletions

View file

@ -6,7 +6,7 @@ variable "datacenters" {
type = list(string) type = list(string)
} }
job "nfs-controller" { job "democratic-csi-nfs-controller" {
datacenters = var.datacenters datacenters = var.datacenters
region = var.region region = var.region
@ -15,23 +15,37 @@ job "nfs-controller" {
driver = "docker" driver = "docker"
config { config {
image = "mcr.microsoft.com/k8s/csi/nfs-csi:latest" image = "docker.io/democraticcsi/democratic-csi:latest"
args = [ args = [
"--endpoint=unix://csi/csi.sock", "--csi-version=1.5.0",
"-v=5", # must match the csi_plugin.id attribute below
] "--csi-name=org.democratic-csi.nfs",
"--driver-config-file=${NOMAD_TASK_DIR}/driver-config-file.yaml",
"--log-level=info",
"--csi-mode=controller",
"--server-socket=/csi/csi.sock",
]
}
template {
destination = "${NOMAD_TASK_DIR}/driver-config-file.yaml"
data = <<EOH
driver: node-manual
EOH
} }
csi_plugin { csi_plugin {
id = "nfs" # must match --csi-name arg
type = "controller" id = "org.democratic-csi.nfs"
mount_dir = "/csi" type = "controller"
mount_dir = "/csi"
} }
resources { resources {
cpu = 250 cpu = 500
memory = 128 memory = 256
} }
} }
} }

View file

@ -6,7 +6,7 @@ variable "datacenters" {
type = list(string) type = list(string)
} }
job "nfs-node" { job "democratic-csi-nfs-node" {
datacenters = var.datacenters datacenters = var.datacenters
region = var.region region = var.region
@ -16,28 +16,48 @@ job "nfs-node" {
task "plugin" { task "plugin" {
driver = "docker" driver = "docker"
config { env {
image = "mcr.microsoft.com/k8s/csi/nfs-csi:latest" CSI_NODE_ID = "${attr.unique.hostname}"
}
args = [ config {
"--v=5", image = "docker.io/democraticcsi/democratic-csi:latest"
"--nodeid=${attr.unique.hostname}",
"--endpoint=unix:///csi/csi.sock", args = [
"--drivername=nfs.csi.k8s.io" "--csi-version=1.5.0",
# must match the csi_plugin.id attribute below
"--csi-name=org.democratic-csi.nfs",
"--driver-config-file=${NOMAD_TASK_DIR}/driver-config-file.yaml",
"--log-level=info",
"--csi-mode=node",
"--server-socket=/csi/csi.sock",
] ]
privileged = true # node plugins must run as privileged jobs because they
# mount disks to the host
privileged = true
ipc_mode = "host"
network_mode = "host"
}
template {
destination = "${NOMAD_TASK_DIR}/driver-config-file.yaml"
data = <<EOH
driver: node-manual
EOH
} }
csi_plugin { csi_plugin {
id = "nfs" # must match --csi-name arg
type = "node" id = "org.democratic-csi.nfs"
mount_dir = "/csi" type = "node"
mount_dir = "/csi"
} }
resources { resources {
cpu = 250 cpu = 500
memory = 128 memory = 256
} }
} }
} }

View file

@ -18,8 +18,16 @@ upstream reicio {
server {{ env "NOMAD_UPSTREAM_ADDR_reicio" }}; server {{ env "NOMAD_UPSTREAM_ADDR_reicio" }};
} }
upstream matrix-synapse {
server {{ env "NOMAD_UPSTREAM_ADDR_matrix_synapse" }};
}
upstream matrix-mautrix-facebook {
server {{ env "NOMAD_UPSTREAM_ADDR_matrix-mautrix-facebook" }};
}
server { server {
listen 443 ssl; listen 443 ssl http2;
server_name _; server_name _;
@ -29,7 +37,7 @@ server {
} }
server { server {
listen 443 ssl; listen 443 ssl http2;
server_name gitea.redalder.org; server_name gitea.redalder.org;
@ -45,7 +53,7 @@ server {
} }
server { server {
listen 443 ssl; listen 443 ssl http2;
server_name hydra.redalder.org; server_name hydra.redalder.org;
@ -59,7 +67,7 @@ server {
} }
server { server {
listen 443 ssl; listen 443 ssl http2;
server_name redalder.org nixng.org; server_name redalder.org nixng.org;
@ -80,4 +88,31 @@ server {
include /local/headers.conf; include /local/headers.conf;
proxy_pass http://website; proxy_pass http://website;
} }
}
server {
listen 443 ssl http2;
listen 8448 ssl http2;
server_name matrix.redalder.org;
merge_slashes off;
location /_matrix/ {
proxy_pass http://matrix-synapse$request_uri;
proxy_set_header Host $http_host;
proxy_buffering off;
}
location /mufb/ {
proxy_pass http://matrix-mautrix-facebook$request_uri;
proxy_set_header Host $http_host;
proxy_buffering off;
}
location / {
return 404;
}
include /local/security.conf;
include /local/ssl.conf;
} }

View file

@ -40,6 +40,12 @@ job "ingress" {
host_network = "public" host_network = "public"
} }
port "http-matrix" {
static = 8448
to = 8448
host_network = "public"
}
port "https" { port "https" {
static = 443 static = 443
to = 443 to = 443
@ -119,13 +125,33 @@ job "ingress" {
mode = "local" mode = "local"
} }
} }
upstreams {
destination_name = "matrix-synapse"
local_bind_port = 6167
datacenter = "homelab-1"
mesh_gateway {
mode = "local"
}
}
upstreams {
destination_name = "matrix-mautrix-facebook"
local_bind_port = 29319
datacenter = "homelab-1"
mesh_gateway {
mode = "local"
}
}
} }
} }
} }
} }
task "nginx" { task "nginx" {
driver = "docker" driver = "containerd-driver"
volume_mount { volume_mount {
volume = "ingress-letsencrypt" volume = "ingress-letsencrypt"
@ -133,21 +159,15 @@ job "ingress" {
read_only = false read_only = false
} }
# artifact {
# source = "http://hydra/build/99/download/1/image.tar.gz"
# }
config { config {
# load = "nixng-ingress.tar.gz" flake_ref = "${var.flake_ref}#nixngSystems.ingressToothpick.config.system.build.toplevel"
image = "nixng-ingress:local" flake_sha = var.flake_sha
entrypoint = [ "init" ]
ports = ["http", "https", "minecraft"]
memory_hard_limit = 128
} }
resources { resources {
cpu = 200 cpu = 200
memory = 32 memory = 128
} }
template { template {

View file

@ -4,7 +4,7 @@ data "local_file" "ingress-upstreams" {
resource "nomad_volume" "ingress-letsencrypt" { resource "nomad_volume" "ingress-letsencrypt" {
type = "csi" type = "csi"
plugin_id = "nfs" plugin_id = "org.democratic-csi.nfs"
volume_id = "ingress-letsencrypt" volume_id = "ingress-letsencrypt"
name = "ingress-letsencrypt" name = "ingress-letsencrypt"
external_id = "ingress-letsencrypt" external_id = "ingress-letsencrypt"
@ -17,6 +17,8 @@ resource "nomad_volume" "ingress-letsencrypt" {
context = { context = {
server = "10.64.2.1" server = "10.64.2.1"
share = "/var/nfs/ingress-letsencrypt" share = "/var/nfs/ingress-letsencrypt"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
} }
mount_options { mount_options {

View file

@ -1,9 +1,9 @@
resource "nomad_volume" "conduit-data" { resource "nomad_volume" "matrix-synapse" {
type = "csi" type = "csi"
plugin_id = "nfs" plugin_id = "org.democratic-csi.nfs"
volume_id = "conduit-data" volume_id = "matrix-synapse"
name = "conduit-data" name = "matrix-synapse"
external_id = "conduit-data" external_id = "matrix-synapse"
capability { capability {
access_mode = "single-node-writer" access_mode = "single-node-writer"
@ -12,22 +12,92 @@ resource "nomad_volume" "conduit-data" {
context = { context = {
server = "blowhole.hosts.in.redalder.org" server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/conduit-data" share = "/var/nfs/matrix/synapse"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
} }
mount_options { mount_options {
fs_type = "nfs" fs_type = "nfs"
mount_flags = [ "nolock", "hard" ] mount_flags = [ "nfsvers=3", "hard", "async" ]
} }
} }
resource "nomad_volume" "matrix-registrations" {
type = "csi"
plugin_id = "org.democratic-csi.nfs"
volume_id = "matrix-registrations"
name = "matrix-registrations"
external_id = "matrix-registrations"
capability {
access_mode = "multi-node-multi-writer"
attachment_mode = "file-system"
}
context = {
server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/matrix/registrations"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
}
mount_options {
fs_type = "nfs"
mount_flags = [ "nfsvers=3", "hard", "async" ]
}
}
resource "nomad_volume" "matrix-mautrix-facebook" {
type = "csi"
plugin_id = "org.democratic-csi.nfs"
volume_id = "matrix-mautrix-facebook"
name = "matrix-mautrix-facebook"
external_id = "matrix-mautrix-facebook"
capability {
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
context = {
server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/matrix/mautrix-facebook"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
}
mount_options {
fs_type = "nfs"
mount_flags = [ "nfsvers=3", "hard", "async" ]
}
}
resource "vault_policy" "matrix-mautrix-facebook-policy" {
name = "matrix-mautrix-facebook-policy"
policy = <<EOF
path "kv/data/matrix/mautrix-facebook" {
capabilities = ["read"]
}
EOF
}
resource "vault_policy" "matrix-synapse-policy" {
name = "matrix-synapse-policy"
policy = <<EOF
path "kv/data/matrix/synapse" {
capabilities = ["read"]
}
EOF
}
resource "nomad_job" "conduit" { resource "nomad_job" "conduit" {
jobspec = file("${path.module}/job/conduit.hcl") jobspec = file("${path.module}/job/conduit.hcl")
hcl2 { hcl2 {
enabled = true enabled = true
vars = { vars = {
flake_ref = "${var.flake_host_alt}?rev=${var.flake_rev}" flake_ref = "${var.flake_host}?ref=${var.flake_ref}&rev=${var.flake_rev}"
flake_sha = var.flake_sha flake_sha = var.flake_sha
} }
} }

View file

@ -1,6 +1,6 @@
resource "nomad_volume" "home-assistant_hass" { resource "nomad_volume" "home-assistant_hass" {
type = "csi" type = "csi"
plugin_id = "nfs" plugin_id = "org.democratic-csi.nfs"
volume_id = "home-assistant_hass" volume_id = "home-assistant_hass"
name = "home-assistant_hass" name = "home-assistant_hass"
external_id = "home-assistant_hass" external_id = "home-assistant_hass"
@ -13,17 +13,19 @@ resource "nomad_volume" "home-assistant_hass" {
context = { context = {
server = "blowhole.hosts.in.redalder.org" server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/home-assistant_hass" share = "/var/nfs/home-assistant_hass"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
} }
mount_options { mount_options {
fs_type = "nfs" fs_type = "nfs"
mount_flags = [ "nolock", "hard" ] mount_flags = [ "nfsvers=3", "hard", "async" ]
} }
} }
resource "nomad_volume" "home-assistant_zigbee2mqtt" { resource "nomad_volume" "home-assistant_zigbee2mqtt" {
type = "csi" type = "csi"
plugin_id = "nfs" plugin_id = "org.democratic-csi.nfs"
volume_id = "home-assistant_zigbee2mqtt" volume_id = "home-assistant_zigbee2mqtt"
name = "home-assistant_zigbee2mqtt" name = "home-assistant_zigbee2mqtt"
external_id = "home-assistant_zigbee2mqtt" external_id = "home-assistant_zigbee2mqtt"
@ -36,17 +38,19 @@ resource "nomad_volume" "home-assistant_zigbee2mqtt" {
context = { context = {
server = "blowhole.hosts.in.redalder.org" server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/home-assistant_zigbee2mqtt" share = "/var/nfs/home-assistant_zigbee2mqtt"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
} }
mount_options { mount_options {
fs_type = "nfs" fs_type = "nfs"
mount_flags = [ "nolock", "hard" ] mount_flags = [ "nfsvers=3", "hard", "async" ]
} }
} }
resource "nomad_volume" "home-assistant_mosquitto" { resource "nomad_volume" "home-assistant_mosquitto" {
type = "csi" type = "csi"
plugin_id = "nfs" plugin_id = "org.democratic-csi.nfs"
volume_id = "home-assistant_mosquitto" volume_id = "home-assistant_mosquitto"
name = "home-assistant_mosquitto" name = "home-assistant_mosquitto"
external_id = "home-assistant_mosquitto" external_id = "home-assistant_mosquitto"
@ -59,11 +63,13 @@ resource "nomad_volume" "home-assistant_mosquitto" {
context = { context = {
server = "blowhole.hosts.in.redalder.org" server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/home-assistant_mosquitto" share = "/var/nfs/home-assistant_mosquitto"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
} }
mount_options { mount_options {
fs_type = "nfs" fs_type = "nfs"
mount_flags = [ "nolock", "hard" ] mount_flags = [ "nfsvers=3", "hard", "async" ]
} }
} }

View file

@ -1,6 +1,6 @@
resource "nomad_volume" "jellyfin-cache" { resource "nomad_volume" "jellyfin-cache" {
type = "csi" type = "csi"
plugin_id = "nfs" plugin_id = "org.democratic-csi.nfs"
volume_id = "jellyfin-cache" volume_id = "jellyfin-cache"
name = "jellyfin-cache" name = "jellyfin-cache"
external_id = "jellyfin-cache" external_id = "jellyfin-cache"
@ -13,17 +13,19 @@ resource "nomad_volume" "jellyfin-cache" {
context = { context = {
server = "blowhole.hosts.in.redalder.org" server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/jellyfin/cache" share = "/var/nfs/jellyfin/cache"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
} }
mount_options { mount_options {
fs_type = "nfs" fs_type = "nfs"
mount_flags = [ "nolock", "hard" ] mount_flags = [ "nfsvers=3", "hard", "async" ]
} }
} }
resource "nomad_volume" "jellyfin-config" { resource "nomad_volume" "jellyfin-config" {
type = "csi" type = "csi"
plugin_id = "nfs" plugin_id = "org.democratic-csi.nfs"
volume_id = "jellyfin-config" volume_id = "jellyfin-config"
name = "jellyfin-config" name = "jellyfin-config"
external_id = "jellyfin-config" external_id = "jellyfin-config"
@ -36,17 +38,19 @@ resource "nomad_volume" "jellyfin-config" {
context = { context = {
server = "blowhole.hosts.in.redalder.org" server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/jellyfin/config" share = "/var/nfs/jellyfin/config"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
} }
mount_options { mount_options {
fs_type = "nfs" fs_type = "nfs"
mount_flags = [ "nolock", "hard" ] mount_flags = [ "nfsvers=3", "hard", "async" ]
} }
} }
resource "nomad_volume" "jellyfin-media" { resource "nomad_volume" "jellyfin-media" {
type = "csi" type = "csi"
plugin_id = "nfs" plugin_id = "org.democratic-csi.nfs"
volume_id = "jellyfin-media" volume_id = "jellyfin-media"
name = "jellyfin-media" name = "jellyfin-media"
external_id = "jellyfin-media" external_id = "jellyfin-media"
@ -59,11 +63,13 @@ resource "nomad_volume" "jellyfin-media" {
context = { context = {
server = "blowhole.hosts.in.redalder.org" server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/jellyfin/media" share = "/var/nfs/jellyfin/media"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
} }
mount_options { mount_options {
fs_type = "nfs" fs_type = "nfs"
mount_flags = [ "nolock", "hard" ] mount_flags = [ "nfsvers=3", "hard", "async" ]
} }
} }

View file

@ -6,22 +6,31 @@ variable "flake_sha" {
type = string type = string
} }
job "conduit" { job "matrix" {
datacenters = [ "homelab-1" ] datacenters = [ "homelab-1" ]
type = "service" type = "service"
group "svc" { group "mautrix-facebook" {
count = 1 count = 1
volume "conduit-data" { volume "matrix-mautrix-facebook" {
type = "csi" type = "csi"
source = "conduit-data" source = "matrix-mautrix-facebook"
read_only = false read_only = false
attachment_mode = "file-system" attachment_mode = "file-system"
access_mode = "single-node-writer" access_mode = "single-node-writer"
} }
volume "matrix-registrations" {
type = "csi"
source = "matrix-registrations"
read_only = false
attachment_mode = "file-system"
access_mode = "multi-node-multi-writer"
}
restart { restart {
attempts = 5 attempts = 5
delay = "5s" delay = "5s"
@ -32,29 +41,133 @@ job "conduit" {
} }
service { service {
name = "conduit" name = "matrix-mautrix-facebook"
port = "6167" port = "29319"
check { # check {
type = "http" # type = "http"
address_mode = "alloc" # address_mode = "alloc"
path = "/" # path = "/public"
port = "6167" # port = "29319"
interval = "2s" # interval = "2s"
timeout = "2s" # timeout = "2s"
} # }
connect { connect {
sidecar_service {} sidecar_service {}
} }
} }
task "app" { task "mautrix-facebook" {
driver = "containerd-driver" driver = "containerd-driver"
volume_mount { volume_mount {
volume = "conduit-data" volume = "matrix-mautrix-facebook"
destination = "/var/lib/matrix-conduit" destination = "/var/lib/mautrix-facebook"
read_only = false
}
volume_mount {
volume = "matrix-registrations"
destination = "/var/lib/registrations"
read_only = false
}
config {
flake_ref = "${var.flake_ref}#nixngSystems.mautrix-facebook.config.system.build.toplevel"
flake_sha = var.flake_sha
entrypoint = [ "init" ]
}
vault {
policies = ["matrix-mautrix-facebook-policy"]
}
template {
data = <<EOF
{{ with secret "kv/data/matrix/mautrix-facebook" }}
MAUTRIX_FACEBOOK_APPSERVICE_AS_TOKEN={{ .Data.data.as_token }}
MAUTRIX_FACEBOOK_APPSERVICE_HS_TOKEN={{ .Data.data.hs_token }}
{{ end }}
EOF
destination = "secrets/environment"
env = true
}
resources {
cpu = 500
memory = 1024
}
}
}
group "synapse" {
count = 1
volume "matrix-synapse" {
type = "csi"
source = "matrix-synapse"
read_only = false
attachment_mode = "file-system"
access_mode = "single-node-writer"
}
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-synapse"
port = "6167"
check {
type = "http"
address_mode = "alloc"
path = "/_matrix/client/versions"
port = "6167"
interval = "2s"
timeout = "2s"
}
connect {
sidecar_service {
proxy {
upstreams {
destination_name = "matrix-mautrix-facebook"
local_bind_port = 29319
}
}
}
}
}
task "synapse" {
driver = "containerd-driver"
volume_mount {
volume = "matrix-synapse"
destination = "/var/lib/synapse"
read_only = false
}
volume_mount {
volume = "matrix-registrations"
destination = "/var/lib/registrations"
read_only = false read_only = false
} }
@ -65,8 +178,23 @@ job "conduit" {
} }
resources { resources {
cpu = 500 cpu = 2048
memory = 1024 memory = 4096
}
vault {
policies = ["matrix-synapse-policy"]
}
template {
data = <<EOF
{{ with secret "kv/data/matrix/synapse" }}
registration_shared_secret: "{{ .Data.data.registration_shared_secret }}"
macaroon_secret_key: "{{ .Data.data.macaroon_secret_key }}"
form_secret: "{{ .Data.data.form_secret }}"
{{ end }}
EOF
destination = "/secrets/extra.yaml"
} }
} }
} }

View file

@ -181,7 +181,7 @@ EOF
network { network {
mode = "bridge" mode = "bridge"
port "http" { port "http" {
static = 8123 static = 8123
to = 8123 to = 8123
@ -229,8 +229,8 @@ EOF
resources { resources {
cpu = 128 cpu = 128
memory = 128 memory = 256
memory_max = 256 memory_max = 512
} }
volume_mount { volume_mount {

View file

@ -86,16 +86,16 @@ job "jellyfin" {
config { config {
image = "jellyfin/jellyfin@sha256:73501b70b0e884e5815d8f03d22973513ae7cadbcd8dba95da60e1d7c82dac7b" image = "jellyfin/jellyfin@sha256:73501b70b0e884e5815d8f03d22973513ae7cadbcd8dba95da60e1d7c82dac7b"
devices = [ # devices = [
{ # {
host_path = "/dev/dri/renderD128" # host_path = "/dev/dri/renderD128"
container_path = "/dev/dri/renderD128" # container_path = "/dev/dri/renderD128"
}, # },
{ # {
host_path = "/dev/dri/card0" # host_path = "/dev/dri/card0"
container_path = "/dev/dri/card0" # container_path = "/dev/dri/card0"
} # }
] # ]
} }
resources { resources {

View file

@ -1,6 +1,6 @@
resource "nomad_volume" "syncthing-data" { resource "nomad_volume" "syncthing-data" {
type = "csi" type = "csi"
plugin_id = "nfs" plugin_id = "org.democratic-csi.nfs"
volume_id = "syncthing-data" volume_id = "syncthing-data"
name = "syncthing-data" name = "syncthing-data"
external_id = "syncthing-data" external_id = "syncthing-data"
@ -13,17 +13,19 @@ resource "nomad_volume" "syncthing-data" {
context = { context = {
server = "blowhole.hosts.in.redalder.org" server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/syncthing/data" share = "/var/nfs/syncthing/data"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
} }
mount_options { mount_options {
fs_type = "nfs" fs_type = "nfs"
mount_flags = [ "nolock", "hard" ] mount_flags = [ "nfsvers=3", "hard", "async" ]
} }
} }
resource "nomad_volume" "syncthing-storage" { resource "nomad_volume" "syncthing-storage" {
type = "csi" type = "csi"
plugin_id = "nfs" plugin_id = "org.democratic-csi.nfs"
volume_id = "syncthing-storage" volume_id = "syncthing-storage"
name = "syncthing-storage" name = "syncthing-storage"
external_id = "syncthing-storage" external_id = "syncthing-storage"
@ -36,17 +38,19 @@ resource "nomad_volume" "syncthing-storage" {
context = { context = {
server = "blowhole.hosts.in.redalder.org" server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/syncthing/storage" share = "/var/nfs/syncthing/storage"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
} }
mount_options { mount_options {
fs_type = "nfs" fs_type = "nfs"
mount_flags = [ "nolock", "hard" ] mount_flags = [ "nfsvers=3", "hard", "async" ]
} }
} }
resource "nomad_volume" "syncthing-config" { resource "nomad_volume" "syncthing-config" {
type = "csi" type = "csi"
plugin_id = "nfs" plugin_id = "org.democratic-csi.nfs"
volume_id = "syncthing-config" volume_id = "syncthing-config"
name = "syncthing-config" name = "syncthing-config"
external_id = "syncthing-config" external_id = "syncthing-config"
@ -59,11 +63,13 @@ resource "nomad_volume" "syncthing-config" {
context = { context = {
server = "blowhole.hosts.in.redalder.org" server = "blowhole.hosts.in.redalder.org"
share = "/var/nfs/syncthing/config" share = "/var/nfs/syncthing/config"
node_attach_driver = "nfs"
provisioner_driver = "node-manual"
} }
mount_options { mount_options {
fs_type = "nfs" fs_type = "nfs"
mount_flags = [ "nolock", "hard" ] mount_flags = [ "nfsvers=3", "hard", "async" ]
} }
} }

View file

@ -1,6 +1,6 @@
flake_rev = "1de7117dca94932945dab6cb92315a74edcf01d5" flake_rev = "e7216e601a70f595893971d8b6f2296f3e867269"
flake_ref = "home-assistant" flake_ref = "conduit-wip"
# flake_host = "git+https://gitea.redalder.org/RedAlder/systems" flake_host = "git+https://git.sr.ht/~magic_rb/cluster"
flake_host = "git+https://git.irunx.org/MagicRB/ra-systems" flake_host_alt = "git+https://git.sr.ht/~magic_rb/cluster"
flake_host_alt = "git+https://git.irunx.org/MagicRB/ra-systems" flake_sha = "sha256-RJDAmsZJjBVvbYBG1vP5Se+i3n2IO3E2Y5fWFFmQ7lQ="
flake_sha = "sha256-QhVT7sAEzMNyYeInRNdI30JK6E7x1ksTZc1DSPNHNZ0="