summary refs log tree commit diff
path: root/host
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-26 13:28:59 +0100
committerRory& <root@rory.gay>2025-12-26 13:28:59 +0100
commitbe522bad489103a2ea5607c81922dc20d3c8a502 (patch)
treea45c26e4b253171220529e638c7721e4ba8cb753 /host
parentImport Spacebar-nginx domains into Rory-ovh (diff)
downloadRory-Open-Architecture-be522bad489103a2ea5607c81922dc20d3c8a502.tar.xz
Spacebar maybe?
Diffstat (limited to 'host')
-rw-r--r--host/Rory-ovh/services/containers/spacebar/container.nix29
-rw-r--r--host/Rory-ovh/services/containers/spacebar/root.nix16
-rw-r--r--host/Rory-ovh/services/containers/spacebar/services/spacebar.nix17
3 files changed, 62 insertions, 0 deletions
diff --git a/host/Rory-ovh/services/containers/spacebar/container.nix b/host/Rory-ovh/services/containers/spacebar/container.nix
new file mode 100644

index 0000000..9e141ca --- /dev/null +++ b/host/Rory-ovh/services/containers/spacebar/container.nix
@@ -0,0 +1,29 @@ +{ + draupnir, + ... +}: + +{ + privateNetwork = true; + autoStart = true; + specialArgs = { + inherit draupnir; + }; + config = + { lib, pkgs, ... }: + { + imports = [ + ../shared.nix + ./root.nix + ./services/spacebar.nix + ]; + }; + hostAddress = "192.168.100.1"; + localAddress = "192.168.100.22"; + + bindMounts."spacebar-storage" = { + hostPath = "/data/dedicated/spacebar-storage"; + mountPoint = "/storage"; + isReadOnly = true; + }; +} diff --git a/host/Rory-ovh/services/containers/spacebar/root.nix b/host/Rory-ovh/services/containers/spacebar/root.nix new file mode 100644
index 0000000..0ebce9e --- /dev/null +++ b/host/Rory-ovh/services/containers/spacebar/root.nix
@@ -0,0 +1,16 @@ +{ ... }: + +{ + networking.useHostResolvConf = true; + + networking.hosts = { + "192.168.100.1" = [ + "matrix.rory.gay" + "rory.gay" + ]; + }; + + networking.firewall = { + enable = true; + }; +} diff --git a/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix b/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix new file mode 100644
index 0000000..013ad4f --- /dev/null +++ b/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix
@@ -0,0 +1,17 @@ +{ spacebar, ... }: + +let + sb = import "${spacebar}/nix/modules/default/lib.nix"; +in +{ + imports = [ "${spacebar}/nix/modules/default/services/spacebarchat-server.nix" ]; + services.spacebarchat-server = { + enable = true; + apiEndpoint = sb.mkEndpoint "api.rory.server.spacebar.chat" 3001 true; + gatewayEndpoint = sb.mkEndpoint "gateway.rory.server.spacebar.chat" 3002 true; + cdnEndpoint = sb.mkEndpoint "cdn.rory.server.spacebar.chat" 3003 true; + settings = { + + }; + }; +}