From 86fef3990ed32d5cdd2e4b6825ec3ca94df3c99f Mon Sep 17 00:00:00 2001 From: Amanda Graven Date: Mon, 16 Oct 2023 07:56:23 +0200 Subject: [PATCH] Finish configuring sliding sync --- config/hosts/wind/data/secrets/secrets.nix | Bin 1548 -> 1660 bytes .../wind/data/secrets/synapse_extra_config | Bin 683 -> 22 bytes .../data/secrets/synapse_sliding_sync_env | Bin 0 -> 103 bytes config/hosts/wind/services/nginx.nix | 11 ++++++++--- config/hosts/wind/services/synapse.nix | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 config/hosts/wind/data/secrets/synapse_sliding_sync_env diff --git a/config/hosts/wind/data/secrets/secrets.nix b/config/hosts/wind/data/secrets/secrets.nix index d95a37cdb202d2b8128269925995f2641737b549..47c5c6e576357d396caf46ad06a23932484a0caf 100644 GIT binary patch literal 1660 zcmV-?27~zkM@dveQdv+`01&zC*+~iygCw;p(&iTZ)W2Q9kNLj=Td>ol5g_xFN_`dT+Tb!?1PSMH zI|8#gR9d%iU3rRs!o^ad7K+8I(|*#9VDHE8_2t6dhi%pq?6y+3m(hSjZ~c3z#!UW) zIgFhxl6i!$^(ve{nJ0R$t|}tYnHb7PGag?2b_9YxHJ}}eM`^&qhf^p+E1_Qm)fUQ} ziqg(ia|Lj|Qz{|yFiBym?qej@N2~hE76~21;a!_3{v2;fU%H^-`RV7EG1to+IZ0ha zv$QUdqvSog)ZAJs>`eu8Dh%X7UFNv!N)yijrWlflq%zuXBu)NP)ty#m6l2L)(Q~g3 z3PjiMm`m7g9ijyIYfhO6mM)fC=Eb#&Lf-CTf#gE+U=x%QEK^c+Vf|aM9m`?x16K_1 z3}$ckwPNJ}3F#RsAHj|rt6MpzM#4g?JYk;qcL~^o{LW7Y+Pq+Lm;^N1KzqIS$Q9Rm z$Z*(m{3fx>>KV?cFxXvrQtB#0d$*X z9rH)+EC}SmOg}Z+3aC#XGDFhqABvgJkb^A|4ub7MWfoZM$`)mZnwcxl!lP_cmWi^{ zswA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92Gn z<(W2w*KVI7S12rL5fNcS8FQkz%7z^tTw?mt)Ye8`%p@BEh~MtA`i~DHh)BV92@K_g zT1Pq;WKMIq;ow*>JS$)H^qKb;m#|?A_{Skbw?Z30~CI(P*mJ54&SMiEYQVUWf1zK$50PU1FvP=Id8axx-leaC769#g_ zH&$|wVTLKBzbIef34Inw%Su4t)4V@#-B(h3b3`sv?oylyVMBm$V7V^D=_M%vXh6qH zKH$ZE9{(Rk3nt)6fNTu^O8@J8^9YEaRyBt%J;=Z#$+qD~lAf8ZoB0hWN1nq17hD23 z(#CN@)Ap;71f2qp6I8EqK8!4WY*2}j(TX))ZMA)y$!ImVTp`MhSW+7RI4xVN91ud+fJq2^3k7-)85%i3N=Z(Lj|6W*fj9-I3%SJ}DEuccnNnV?XY z*nwwWlr5ooMmj>2w@vf90IO$0XmrxZS=GLrm)0WYK<%zcG`W>xrHNA;cm|3N5t0UG y6)vE5{g@i@4iwj)>n7_n$J;w63G`@eLhGJ`WL*se{ri~(Sszl95xPhgr-A^eSMtyR diff --git a/config/hosts/wind/data/secrets/synapse_extra_config b/config/hosts/wind/data/secrets/synapse_extra_config index 2b6eb7afca09f78437ed30d99c076e2d4022988d..34083055a5f57ba626f8ddbd0c9175d78597da85 100644 GIT binary patch literal 22 dcmZQ@_Y83kiVO&02z~#2Peppn)D1$S3jtUk2&Mo4 literal 683 zcmV;c0#y9~M@dveQdv+`0MO7E|M{R#z(!?D>XyGBNEMQsm{xuK-%H6&<&` z${=X<2yFe{UR;aRp&!agk6YJ5T{W$EfL|r;M#Rz_Ietq3a7dTQ^YB=R!YUoPzxgOG z%4=D_BMNAZWx&O7#%6(@Xyl4Wa4m?9#N|tloPqO>SMWw zFF5AtqHwpYf0=8mzDtWLR5HOXBY)JmH!mza_WqU{sQ zG8itDiD?bQqRzR1I*0Oar0|En4oMasfJ@=b)XCp;G>LmS3E0H$Y99}f)kDzbv$&EZ_Mr4 zWBjPiMq?K8mtnD6{=n=m7{u&|CvTOs1rU+OF*-a5o3$uex4qcWmCDHr8`hohOdM-z zm8a+4K_f$T-;WdD##B0rV|ZY&P)D>Oj!daXH+I28ny{!-yOx&FI@IwBydZ|l%uq3n z8S8sZ`~Px6(4F-J*9>ViXJ0e^dM_VY&w>q3gmFNsLGg2gB6A-@9$^Za0Hvu@L_v>> z3Sky3z)jCmerCOjE@eB0Ma_)Y*JaFx4RE$MA?HH|XLsq=ydHQ({c!dEBfz?;cIjsS RHIJKwlRaAlIP{+|n{w8EOwa%T diff --git a/config/hosts/wind/data/secrets/synapse_sliding_sync_env b/config/hosts/wind/data/secrets/synapse_sliding_sync_env new file mode 100644 index 0000000000000000000000000000000000000000..b5b3eecbae3ada7fab4564adfb6cc539d87f10a3 GIT binary patch literal 103 zcmV-t0GR&(M@dveQdv+`0LyE?BOnHVVd2Xj4=tt+bS}Y0v;sROn+cAgcU$L_yJc)o za#Mnu>GJPp#3&h{xJt}uK5#4n11$|$J#}SgE3=&IJ!;*8qGMdz2YAq}s&811x@+hZ J46P#~i?Ls3E8zeD literal 0 HcmV?d00001 diff --git a/config/hosts/wind/services/nginx.nix b/config/hosts/wind/services/nginx.nix index 875a586..f6e97e6 100644 --- a/config/hosts/wind/services/nginx.nix +++ b/config/hosts/wind/services/nginx.nix @@ -5,9 +5,14 @@ enableACME = true; forceSSL = true; locations."/".root = "/var/www/graven.dev/public"; - locations."~ ^(\\/_matrix|\\/_synapse\\/client)".proxyPass = "http://127.0.0.1:8008"; - locations."~ ^(\\/_matrix|\\/_synapse\\/client)".proxyPass = "http://127.0.0.1:8008"; - locations."~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync)".proxyPass = "http://127.0.0.1:8009"; + locations."~ ^/(client|_matrix/client/unstable/org.matrix.msc3575/sync)" = { + proxyPass = "http://127.0.0.1:8009"; + priority = 900; + }; + locations."~ ^(\\/_matrix|\\/_synapse\\/client)" = { + proxyPass = "http://127.0.0.1:8008"; + priority = 1000; + }; locations."/.well-known/matrix/" = { root = "/var/www/matrix/public"; extraConfig = '' diff --git a/config/hosts/wind/services/synapse.nix b/config/hosts/wind/services/synapse.nix index 8e236e2..48cb0b0 100644 --- a/config/hosts/wind/services/synapse.nix +++ b/config/hosts/wind/services/synapse.nix @@ -8,6 +8,7 @@ sliding-sync = { enable = true; settings.SYNCV3_SERVER = "https://graven.dev"; + environmentFile = builtins.toString config.secrets.files.synapse_sliding_sync_env.file; }; settings = { server_name = "graven.dev";