From be522bad489103a2ea5607c81922dc20d3c8a502 Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 26 Dec 2025 13:28:59 +0100 Subject: Spacebar maybe? --- .../services/containers/spacebar/container.nix | 29 ++++++++++++++++++++++ .../Rory-ovh/services/containers/spacebar/root.nix | 16 ++++++++++++ .../containers/spacebar/services/spacebar.nix | 17 +++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 host/Rory-ovh/services/containers/spacebar/container.nix create mode 100644 host/Rory-ovh/services/containers/spacebar/root.nix create mode 100644 host/Rory-ovh/services/containers/spacebar/services/spacebar.nix (limited to 'host') 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 = { + + }; + }; +} -- cgit 1.5.1