diff --git a/flake.lock b/flake.lock
index aae1a8f..1af913a 100644
--- a/flake.lock
+++ b/flake.lock
@@ -546,6 +546,24 @@
"type": "indirect"
}
},
+ "flake-utils_7": {
+ "inputs": {
+ "systems": "systems_8"
+ },
+ "locked": {
+ "lastModified": 1731533236,
+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
@@ -1249,6 +1267,22 @@
"type": "github"
}
},
+ "nixpkgs_11": {
+ "locked": {
+ "lastModified": 1766309749,
+ "narHash": "sha256-3xY8CZ4rSnQ0NqGhMKAy5vgC+2IVK0NoVEzDoOh4DA4=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "a6531044f6d0bef691ea18d4d4ce44d0daa6e816",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
"nixpkgs_2": {
"locked": {
"lastModified": 1726042813,
@@ -1482,6 +1516,7 @@
"nom": "nom",
"ooye": "ooye",
"sops-nix": "sops-nix",
+ "spacebar": "spacebar",
"synapseHttpAntispamSrc": "synapseHttpAntispamSrc"
}
},
@@ -1537,6 +1572,25 @@
"type": "github"
}
},
+ "spacebar": {
+ "inputs": {
+ "flake-utils": "flake-utils_7",
+ "nixpkgs": "nixpkgs_11"
+ },
+ "locked": {
+ "lastModified": 1766743281,
+ "narHash": "sha256-tYXF/ZazXIulV0kYo2OOo8/DyIMPxnq5YCFczvYPRrE=",
+ "owner": "spacebarchat",
+ "repo": "server",
+ "rev": "0c4d768bed5faac0ff785925bfffb3331bd249e1",
+ "type": "github"
+ },
+ "original": {
+ "owner": "spacebarchat",
+ "repo": "server",
+ "type": "github"
+ }
+ },
"synapseHttpAntispamSrc": {
"flake": false,
"locked": {
@@ -1658,6 +1712,21 @@
"type": "github"
}
},
+ "systems_8": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
"xdph": {
"inputs": {
"hyprland-protocols": [
diff --git a/flake.nix b/flake.nix
index 7c17cf6..0041cc7 100755
--- a/flake.nix
+++ b/flake.nix
@@ -82,6 +82,10 @@
url = "git+https://cgit.rory.gay/cgit-magenta.git";
inputs.nixpkgs.follows = "nixpkgs";
};
+
+ spacebar = {
+ url = "github:spacebarchat/server";
+ };
# Packages built from git
synapseHttpAntispamSrc = {
@@ -173,6 +177,7 @@
#inherit nixpkgs-Draupnir;
#inherit nixpkgs-DraupnirPkg;
inherit cgit-magenta;
+ inherit spacebar;
inherit (inputs) draupnirSrc;
inherit (inputs) nixpkgs-master;
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 = {
+
+ };
+ };
+}
diff --git a/modules/monitoring/synapse.nix b/modules/monitoring/synapse.nix
index ccc4ae2..f6ad763 100644
--- a/modules/monitoring/synapse.nix
+++ b/modules/monitoring/synapse.nix
@@ -76,7 +76,7 @@ in
options = {
path = builtins.fetchurl {
url = "https://raw.githubusercontent.com/element-hq/synapse/develop/contrib/grafana/synapse.json";
- sha256 = "16fl81sx1by0wldw4vda0zr1pvbq1dpih1fikzwlvmk63mpc80kb";
+ sha256 = "Y7VyvNGnqo+lbc/T3Ky4yBWQu+Kv2mbeK0LmUOWHENI=";
};
};
}
|