From 0706fe3a6eb296a35f538e370bcfd3985e28f610 Mon Sep 17 00:00:00 2001 From: Rory& Date: Mon, 19 Aug 2024 07:56:17 +0200 Subject: Proper grapevine in matrixunittests container --- host/Rory-desktop/configuration.nix | 2 +- host/Rory-nginx/configuration.nix | 11 +++++----- .../containers/matrixunittests/container.nix | 8 +++----- .../matrixunittests/services/conduit.nix | 24 +++++++++++++++------- 4 files changed, 26 insertions(+), 19 deletions(-) (limited to 'host') diff --git a/host/Rory-desktop/configuration.nix b/host/Rory-desktop/configuration.nix index 7fa70ac..50131b5 100644 --- a/host/Rory-desktop/configuration.nix +++ b/host/Rory-desktop/configuration.nix @@ -24,7 +24,7 @@ args@{ ./optional/gui/x11.nix ./optional/gui/wayland.nix - #./printing.nix + ./printing.nix #./ollama.nix ]; diff --git a/host/Rory-nginx/configuration.nix b/host/Rory-nginx/configuration.nix index ab8f6a0..ebcffd3 100755 --- a/host/Rory-nginx/configuration.nix +++ b/host/Rory-nginx/configuration.nix @@ -55,14 +55,13 @@ environment.memoryAllocator.provider = "jemalloc"; - containers."pluralcontactbotpoc" = import ./services/containers/pluralcontactbotpoc/container.nix { - inherit pkgs lib; - conduit = grapevine; - }; + #containers."pluralcontactbotpoc" = import ./services/containers/pluralcontactbotpoc/container.nix { + # inherit pkgs lib; + # conduit = grapevine; + #}; containers."matrixunittests" = import ./services/containers/matrixunittests/container.nix { - inherit pkgs lib; - conduit = grapevine; + inherit pkgs lib grapevine; }; containers."matrixunittests-conduit" = import ./services/containers/matrixunittests-conduit/container.nix { diff --git a/host/Rory-nginx/services/containers/matrixunittests/container.nix b/host/Rory-nginx/services/containers/matrixunittests/container.nix index 3ef68bf..d81fd2f 100755 --- a/host/Rory-nginx/services/containers/matrixunittests/container.nix +++ b/host/Rory-nginx/services/containers/matrixunittests/container.nix @@ -1,16 +1,12 @@ -{ conduit, ... }: +{ grapevine, ... }: { privateNetwork = true; autoStart = true; - specialArgs = { - inherit conduit; - }; config = { lib, pkgs, - conduit, ... }: { @@ -18,6 +14,8 @@ ../shared.nix ./services/nginx.nix ./services/conduit.nix + grapevine.nixosModules.default + ]; environment.etc."resolv.conf".text = '' nameserver 8.8.8.8 diff --git a/host/Rory-nginx/services/containers/matrixunittests/services/conduit.nix b/host/Rory-nginx/services/containers/matrixunittests/services/conduit.nix index b33117f..58c0ce4 100755 --- a/host/Rory-nginx/services/containers/matrixunittests/services/conduit.nix +++ b/host/Rory-nginx/services/containers/matrixunittests/services/conduit.nix @@ -1,13 +1,11 @@ -{ pkgs, conduit, ... }: +{ ... }: { - services.matrix-conduit = { - package = conduit.packages.${pkgs.system}.default; + services.grapevine = { + # package = conduit.packages.${pkgs.system}.default; enable = true; settings.global = { - address = "127.0.0.1"; server_name = "matrixunittests.rory.gay"; - database_backend = "rocksdb"; enable_lightning_bolt = true; max_concurrent_requests = 1000; allow_check_for_updates = false; @@ -15,16 +13,28 @@ yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse = true; allow_guest_registration = true; disable_federation = true; + + listen = [ + { + type = "tcp"; + address = "127.0.0.1"; + port = 6167; + } + ]; + + database = { + backend = "rocksdb"; + }; }; }; systemd.services.matrix-conduit-reg-token = { enable = true; description = "Random registration token for Conduit."; - wantedBy = [ "conduit.service" ]; # So the registration can be used by Conduit. + wantedBy = [ "grapevine.service" ]; # So the registration can be used by Conduit. script = '' - rm -rfv /var/lib/matrix-conduit/* + rm -rfv /var/lib/grapevine/* systemctl daemon-reload systemctl try-restart conduit.service''; serviceConfig = { -- cgit 1.4.1