diff --git a/common/nomad.nix b/common/nomad.nix index c31a716..9e3e0ea 100644 --- a/common/nomad.nix +++ b/common/nomad.nix @@ -34,6 +34,10 @@ in path = "/nix/store"; read_only = true; }; + sw = { + path = "/run/current-system/sw"; + read_only = true; + }; }; }; @@ -84,6 +88,8 @@ in nomad wander damon + # for tiddlypwa + deno ]; networking.firewall = { diff --git a/services/instasync.hcl b/services/instasync.hcl index 68d53cb..09860fa 100644 --- a/services/instasync.hcl +++ b/services/instasync.hcl @@ -4,7 +4,7 @@ job "instasync" { type = "batch" periodic { - cron = "*/5 * * * *" + crons = [ "*/5 * * * *" ] prohibit_overlap = true } @@ -19,12 +19,17 @@ job "instasync" { read_only = true source = "nix-store" } + volume "sw" { + type = "host" + read_only = true + source = "sw" + } task "sync" { driver = "exec" config { - command = "/nix/store/k5inwzpp6a0295pd3nfckk9hq8wmifhz-nodejs-20.15.1/bin/node" + command = "/sw/bin/node" args = ["/code/instasync/sync.js"] } @@ -36,6 +41,10 @@ job "instasync" { volume = "nix-store" destination = "/nix/store" } + volume_mount { + volume = "sw" + destination = "/sw" + } resources { memory = 100 diff --git a/services/resol-gateway.hcl b/services/resol-gateway.hcl index 1be96b5..bfb2afc 100644 --- a/services/resol-gateway.hcl +++ b/services/resol-gateway.hcl @@ -12,6 +12,11 @@ job "resol-gateway" { read_only = true source = "nix-store" } + volume "sw" { + type = "host" + read_only = true + source = "sw" + } network { port "http" { @@ -23,7 +28,7 @@ job "resol-gateway" { driver = "exec" config { - command = "/nix/store/k5inwzpp6a0295pd3nfckk9hq8wmifhz-nodejs-20.15.1/bin/node" + command = "/sw/bin/node" args = ["/code/resol-vbus/examples/json-live-data-server/index.js"] } @@ -35,6 +40,10 @@ job "resol-gateway" { volume = "nix-store" destination = "/nix/store" } + volume_mount { + volume = "sw" + destination = "/sw" + } service { name = "resol-gateway"