This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

migrate matrix: prism -> neoprism; sqlite -> postgres

+22 -69
-61
2configs/matrix.nix
··· 1 - { config, pkgs, ... }: 2 - { 3 - services.matrix-synapse = { 4 - enable = true; 5 - settings = { 6 - server_name = "lassul.us"; 7 - # registration_shared_secret = "yolo"; 8 - database.name = "sqlite3"; 9 - turn_uris = [ 10 - "turn:turn.matrix.org?transport=udp" 11 - "turn:turn.matrix.org?transport=tcp" 12 - ]; 13 - listeners = [ 14 - { 15 - port = 8008; 16 - bind_addresses = [ "::1" ]; 17 - type = "http"; 18 - tls = false; 19 - x_forwarded = true; 20 - resources = [ 21 - { 22 - names = [ "client" ]; 23 - compress = true; 24 - } 25 - { 26 - names = [ "federation" ]; 27 - compress = true; 28 - } 29 - ]; 30 - } 31 - ]; 32 - }; 33 - }; 34 - services.nginx = { 35 - virtualHosts = { 36 - "lassul.us" = { 37 - locations."= /.well-known/matrix/server".extraConfig = '' 38 - add_header Content-Type application/json; 39 - return 200 '${builtins.toJSON { 40 - "m.server" = "matrix.lassul.us:443"; 41 - }}'; 42 - ''; 43 - locations."= /.well-known/matrix/client".extraConfig = '' 44 - add_header Content-Type application/json; 45 - add_header Access-Control-Allow-Origin *; 46 - return 200 '${builtins.toJSON { 47 - "m.homeserver" = { "base_url" = "https://matrix.lassul.us"; }; 48 - "m.identity_server" = { "base_url" = "https://vector.im"; }; 49 - }}'; 50 - ''; 51 - }; 52 - "matrix.lassul.us" = { 53 - forceSSL = true; 54 - enableACME = true; 55 - locations."/_matrix" = { 56 - proxyPass = "http://[::1]:8008"; 57 - }; 58 - }; 59 - }; 60 - }; 61 - }
+2 -2
2configs/dns/lassul.us.zone
··· 1 - @ 3600 IN SOA lassul.us. ns1.lassul.us. 2023121401 7200 3600 86400 3600 1 + @ 3600 IN SOA lassul.us. ns1.lassul.us. 2024031701 7200 3600 86400 3600 2 2 3 3 ;;@ 3600 IN NS ns1 4 4 @ 3600 IN NS ns1 ··· 38 38 codi IN CNAME prism 39 39 go IN CNAME prism 40 40 lol IN CNAME prism 41 - matrix IN CNAME prism 41 + matrix IN CNAME neoprism 42 42 paste IN CNAME prism 43 43 radio IN CNAME prism 44 44 jitsi IN CNAME neoprism
+2 -1
machines/neoprism/config.nix
··· 6 6 ../../2configs/retiolum.nix 7 7 ../../2configs/mail/internet-gateway.nix 8 8 ../../2configs/binary-cache/server.nix 9 - # ../../2configs/matrix.nix 10 9 ../../2configs/gsm-wiki.nix 11 10 ../../2configs/monitoring/telegraf.nix 12 11 ../../2configs/pair-programming.nix 13 12 ../../2configs/nginx.nix 14 13 ../../2configs/shadowsocks.nix 15 14 15 + ../../2configs/services/matrix 16 + ../../2configs/services/matrix/proxy.nix 16 17 # sync-containers 17 18 ../../2configs/consul.nix 18 19 ../../2configs/services/flix/container-host.nix
+1 -1
machines/prism/config.nix
··· 120 120 ../../2configs/container-networking.nix 121 121 ../../2configs/fysiirc.nix 122 122 ../../2configs/bgt-bot 123 - ../../2configs/matrix.nix 123 + ../../2configs/services/matrix/proxy.nix 124 124 (self.inputs.stockholm + "/krebs/2configs/mastodon-proxy.nix") 125 125 { 126 126 services.tor = {
+16 -3
2configs/services/matrix/default.nix
··· 5 5 settings = { 6 6 server_name = "lassul.us"; 7 7 # registration_shared_secret = "yolo"; 8 - database.name = "sqlite3"; 9 8 turn_uris = [ 10 9 "turn:turn.matrix.org?transport=udp" 11 10 "turn:turn.matrix.org?transport=tcp" ··· 13 12 listeners = [ 14 13 { 15 14 port = 8008; 16 - bind_addresses = [ "::1" ]; 15 + bind_addresses = [ 16 + "::1" 17 + config.krebs.build.host.nets.retiolum.ip6.addr 18 + ]; 17 19 type = "http"; 18 20 tls = false; 19 21 x_forwarded = true; ··· 31 33 ]; 32 34 }; 33 35 }; 34 - networking.firewall.allowedTCPPorts = [ 8008 ]; 36 + 37 + # TODO add other VPNs here as well 38 + networking.firewall.interfaces.retiolum.allowedTCPPorts = [ 8008 ]; 39 + 40 + services.postgresql.enable = true; 41 + services.postgresql.initialScript = pkgs.writeText "synapse-init.sql" '' 42 + CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse'; 43 + CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse" 44 + TEMPLATE template0 45 + LC_COLLATE = "C" 46 + LC_CTYPE = "C"; 47 + ''; 35 48 }
+1 -1
2configs/services/matrix/proxy.nix
··· 22 22 forceSSL = true; 23 23 enableACME = true; 24 24 locations."/_matrix" = { 25 - proxyPass = "http://orange.r:8008"; 25 + proxyPass = "http://neoprism.r:8008"; 26 26 }; 27 27 }; 28 28 };