summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-11-07 22:43:26 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-11-07 22:43:26 +0100
commit5b3c59bf26ff8b9c38f3ca78451b42ad0014a585 (patch)
tree515f43dc3a8543f6ca2e7afdd565885e8903e7e6
parentc80473dbef4ca003642322e7243affe52eef4b06 (diff)
downloadnixos-5b3c59bf26ff8b9c38f3ca78451b42ad0014a585.tar
nixos-5b3c59bf26ff8b9c38f3ca78451b42ad0014a585.tar.gz
nixos-5b3c59bf26ff8b9c38f3ca78451b42ad0014a585.tar.bz2
nixos-5b3c59bf26ff8b9c38f3ca78451b42ad0014a585.tar.xz
nixos-5b3c59bf26ff8b9c38f3ca78451b42ad0014a585.zip
...
-rw-r--r--flake.lock48
-rw-r--r--hosts/surtr/http/webdav/default.nix54
-rw-r--r--hosts/vidhar/default.nix16
-rw-r--r--overlays/matrix-synapse/1.70.1/default.nix111
-rw-r--r--overlays/matrix-synapse/1.70.1/plugins/default.nix8
-rw-r--r--overlays/matrix-synapse/1.70.1/plugins/ldap3.nix17
-rw-r--r--overlays/matrix-synapse/1.70.1/plugins/mjolnir-antispam.nix32
-rw-r--r--overlays/matrix-synapse/1.70.1/plugins/pam.nix15
-rw-r--r--overlays/matrix-synapse/1.70.1/plugins/shared-secret-auth.nix26
-rw-r--r--overlays/matrix-synapse/1.70.1/tools/default.nix6
-rw-r--r--overlays/matrix-synapse/1.70.1/tools/rust-synapse-compress-state.nix30
-rw-r--r--overlays/matrix-synapse/1.70.1/tools/synadm.nix47
-rw-r--r--overlays/matrix-synapse/default.nix3
-rw-r--r--overlays/postfix-mta-sts-resolver.nix24
14 files changed, 73 insertions, 364 deletions
diff --git a/flake.lock b/flake.lock
index 54334c39..07386f82 100644
--- a/flake.lock
+++ b/flake.lock
@@ -59,11 +59,11 @@
59 }, 59 },
60 "flake-utils_2": { 60 "flake-utils_2": {
61 "locked": { 61 "locked": {
62 "lastModified": 1659877975, 62 "lastModified": 1667077288,
63 "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", 63 "narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=",
64 "owner": "numtide", 64 "owner": "numtide",
65 "repo": "flake-utils", 65 "repo": "flake-utils",
66 "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", 66 "rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817",
67 "type": "github" 67 "type": "github"
68 }, 68 },
69 "original": { 69 "original": {
@@ -80,11 +80,11 @@
80 "utils": "utils_2" 80 "utils": "utils_2"
81 }, 81 },
82 "locked": { 82 "locked": {
83 "lastModified": 1666253070, 83 "lastModified": 1667830176,
84 "narHash": "sha256-MtaNgghmfp+ywh5mv9FcspFT4ACaYINSN+D98PCkrP0=", 84 "narHash": "sha256-TNm8W88Jf9qELqKI8rGMr0sZWlTV9WKIlqN4dzvuKUA=",
85 "owner": "nix-community", 85 "owner": "nix-community",
86 "repo": "home-manager", 86 "repo": "home-manager",
87 "rev": "c485669ca529e01c1505429fa9017c9a93f15559", 87 "rev": "886675991b643b701a33f533443db165c70692d1",
88 "type": "github" 88 "type": "github"
89 }, 89 },
90 "original": { 90 "original": {
@@ -133,11 +133,11 @@
133 }, 133 },
134 "nixpkgs": { 134 "nixpkgs": {
135 "locked": { 135 "locked": {
136 "lastModified": 1666459110, 136 "lastModified": 1667853482,
137 "narHash": "sha256-T/+pypla/R/RHOOnNvn9kEBvXKtFzYPAh06S8Tzx9sk=", 137 "narHash": "sha256-TcbNo/dT9aS4RpAL/o96m2+3QPabiaKxmR1ILy8jXyY=",
138 "owner": "NixOS", 138 "owner": "NixOS",
139 "repo": "nixpkgs", 139 "repo": "nixpkgs",
140 "rev": "4752722090be8e7fd4ecceb12bee492851837d3d", 140 "rev": "65f397babb8e11100bd63e3aaca715da278dae58",
141 "type": "github" 141 "type": "github"
142 }, 142 },
143 "original": { 143 "original": {
@@ -149,11 +149,11 @@
149 }, 149 },
150 "nixpkgs-22_05": { 150 "nixpkgs-22_05": {
151 "locked": { 151 "locked": {
152 "lastModified": 1665870850, 152 "lastModified": 1667091951,
153 "narHash": "sha256-EkC/Kkc9cr2orI868OHnh6F8/aqS4TZy38ie+KnhfS8=", 153 "narHash": "sha256-62sz0fn06Nq8OaeBYrYSR3Y6hUcp8/PC4dJ7HeGaOhU=",
154 "owner": "NixOS", 154 "owner": "NixOS",
155 "repo": "nixpkgs", 155 "repo": "nixpkgs",
156 "rev": "945a85cb7ee31f5f8c49432d77b610b777662d4f", 156 "rev": "6440d13df2327d2db13d3b17e419784020b71d22",
157 "type": "github" 157 "type": "github"
158 }, 158 },
159 "original": { 159 "original": {
@@ -174,11 +174,11 @@
174 ] 174 ]
175 }, 175 },
176 "locked": { 176 "locked": {
177 "lastModified": 1664550666, 177 "lastModified": 1667620329,
178 "narHash": "sha256-eXfMRd9uItEp3PsYI31FSVGPG9dVC6yF++65ZrGwW8A=", 178 "narHash": "sha256-v1Zk7rtEbAGpevBGPZvZBKpwbmw4I+uVwxvd+pBlp3o=",
179 "owner": "berberman", 179 "owner": "berberman",
180 "repo": "nvfetcher", 180 "repo": "nvfetcher",
181 "rev": "9763ad40d59a044e90726653d9253efaeeb053b2", 181 "rev": "294826951113dcd3aa9abbcacfb1aa5b95a19116",
182 "type": "github" 182 "type": "github"
183 }, 183 },
184 "original": { 184 "original": {
@@ -191,11 +191,11 @@
191 "pypi-deps-db": { 191 "pypi-deps-db": {
192 "flake": false, 192 "flake": false,
193 "locked": { 193 "locked": {
194 "lastModified": 1666427261, 194 "lastModified": 1667852333,
195 "narHash": "sha256-IfzNumTybpMPIVaTAKeWYq6jm7e6co+GUKh1a92cNdk=", 195 "narHash": "sha256-2ZYEs3Xpk8/YbyybW5DtZVP6iv2val+jrzhP3A+JbxU=",
196 "owner": "DavHau", 196 "owner": "DavHau",
197 "repo": "pypi-deps-db", 197 "repo": "pypi-deps-db",
198 "rev": "f3039036e1f993fde9e8ca8020a2d20b89c10b8c", 198 "rev": "0245e14eb2416bc00a97356700549e824d642602",
199 "type": "github" 199 "type": "github"
200 }, 200 },
201 "original": { 201 "original": {
@@ -225,11 +225,11 @@
225 "nixpkgs-22_05": "nixpkgs-22_05" 225 "nixpkgs-22_05": "nixpkgs-22_05"
226 }, 226 },
227 "locked": { 227 "locked": {
228 "lastModified": 1666078616, 228 "lastModified": 1667767301,
229 "narHash": "sha256-ifW3GhIxuKv5+AidKAPpmtS8M7TY2d7VS6eFnaCFdfU=", 229 "narHash": "sha256-+UDtEkw6pZ+sqkC0Um5ocJ9kjvuu0qffSCbl+jAA8K8=",
230 "owner": "Mic92", 230 "owner": "Mic92",
231 "repo": "sops-nix", 231 "repo": "sops-nix",
232 "rev": "8e470d4eac115aa793437e52e84e7f9abdce236b", 232 "rev": "4407353739ad74a3d9744cf2988ab10f3b83e288",
233 "type": "github" 233 "type": "github"
234 }, 234 },
235 "original": { 235 "original": {
@@ -256,11 +256,11 @@
256 }, 256 },
257 "utils_2": { 257 "utils_2": {
258 "locked": { 258 "locked": {
259 "lastModified": 1659877975, 259 "lastModified": 1667395993,
260 "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", 260 "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
261 "owner": "numtide", 261 "owner": "numtide",
262 "repo": "flake-utils", 262 "repo": "flake-utils",
263 "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", 263 "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
264 "type": "github" 264 "type": "github"
265 }, 265 },
266 "original": { 266 "original": {
diff --git a/hosts/surtr/http/webdav/default.nix b/hosts/surtr/http/webdav/default.nix
index 5f2955bc..1da411d3 100644
--- a/hosts/surtr/http/webdav/default.nix
+++ b/hosts/surtr/http/webdav/default.nix
@@ -26,14 +26,14 @@ in {
26 account sufficient pam_unix.so quiet 26 account sufficient pam_unix.so quiet
27 ''; 27 '';
28 users.groups."webdav" = {}; 28 users.groups."webdav" = {};
29 29
30 services.nginx = { 30 services.nginx = {
31 upstreams."py-webdav" = { 31 # upstreams."py-webdav" = {
32 servers = { 32 # servers = {
33 "unix://${webdavSocket}" = {}; 33 # "unix://${webdavSocket}" = {};
34 }; 34 # };
35 }; 35 # };
36 36
37 virtualHosts."webdav.141.li" = { 37 virtualHosts."webdav.141.li" = {
38 forceSSL = true; 38 forceSSL = true;
39 sslCertificate = "/run/credentials/nginx.service/webdav.141.li.pem"; 39 sslCertificate = "/run/credentials/nginx.service/webdav.141.li.pem";
@@ -41,19 +41,19 @@ in {
41 sslTrustedCertificate = "/run/credentials/nginx.service/webdav.141.li.chain.pem"; 41 sslTrustedCertificate = "/run/credentials/nginx.service/webdav.141.li.chain.pem";
42 locations = { 42 locations = {
43 "/".extraConfig = '' 43 "/".extraConfig = ''
44 root /srv/files/$remote_user; 44 root /srv/files/$remote_user;
45 45
46 auth_pam "WebDAV"; 46 auth_pam "WebDAV";
47 auth_pam_service_name "webdav"; 47 auth_pam_service_name "webdav";
48 ''; 48 '';
49 49
50 "/py/".extraConfig = '' 50 # "/py/".extraConfig = ''
51 rewrite ^/py(.*) $1 break; 51 # rewrite ^/py(.*) $1 break;
52 52
53 include ${config.services.nginx.package}/conf/uwsgi_params; 53 # include ${config.services.nginx.package}/conf/uwsgi_params;
54 uwsgi_param SCRIPT_NAME /py; 54 # uwsgi_param SCRIPT_NAME /py;
55 uwsgi_pass py-webdav; 55 # uwsgi_pass py-webdav;
56 ''; 56 # '';
57 }; 57 };
58 extraConfig = '' 58 extraConfig = ''
59 dav_methods PUT DELETE MKCOL COPY MOVE; 59 dav_methods PUT DELETE MKCOL COPY MOVE;
@@ -83,18 +83,18 @@ in {
83 ]; 83 ];
84 84
85 85
86 services.uwsgi.instance.vassals.webdav = { 86 # services.uwsgi.instance.vassals.webdav = {
87 type = "normal"; 87 # type = "normal";
88 socket = webdavSocket; 88 # socket = webdavSocket;
89 listen = 1024; 89 # listen = 1024;
90 master = true; 90 # master = true;
91 vacuum = true; 91 # vacuum = true;
92 chown-socket = "${config.services.nginx.user}:${config.services.uwsgi.group}"; 92 # chown-socket = "${config.services.nginx.user}:${config.services.uwsgi.group}";
93 93
94 plugins = ["python3"]; 94 # plugins = ["python3"];
95 pythonPackages = self: [webdavApp]; 95 # pythonPackages = self: [webdavApp];
96 module = "webdav"; 96 # module = "webdav";
97 callable = "app"; 97 # callable = "app";
98 }; 98 # };
99 }; 99 };
100} 100}
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix
index e40342df..a5c60419 100644
--- a/hosts/vidhar/default.nix
+++ b/hosts/vidhar/default.nix
@@ -129,10 +129,10 @@ with lib;
129 client_body_temp_path /run/nginx-client-bodies; 129 client_body_temp_path /run/nginx-client-bodies;
130 ''; 130 '';
131 upstreams.grafana = { 131 upstreams.grafana = {
132 servers = { "unix:${config.services.grafana.socket}" = {}; }; 132 servers = { "unix:${config.services.grafana.settings.server.socket}" = {}; };
133 }; 133 };
134 virtualHosts = { 134 virtualHosts = {
135 ${config.services.grafana.domain} = { 135 ${config.services.grafana.settings.server.domain} = {
136 forceSSL = true; 136 forceSSL = true;
137 sslCertificate = ./selfsigned.crt; 137 sslCertificate = ./selfsigned.crt;
138 sslCertificateKey = "/run/credentials/nginx.service/selfsigned.key"; 138 sslCertificateKey = "/run/credentials/nginx.service/selfsigned.key";
@@ -146,11 +146,13 @@ with lib;
146 users.users.nginx.extraGroups = ["grafana"]; 146 users.users.nginx.extraGroups = ["grafana"];
147 services.grafana = { 147 services.grafana = {
148 enable = true; 148 enable = true;
149 analytics.reporting.enable = false; 149 settings = {
150 domain = "grafana.vidhar.yggdrasil"; 150 analytics.reporting_enabled = false;
151 security.adminPasswordFile = config.sops.secrets."grafana-admin-password".path; 151 server.protocol = "socket";
152 security.secretKeyFile = config.sops.secrets."grafana-secret-key".path; 152 server.domain = "grafana.vidhar.yggdrasil";
153 protocol = "socket"; 153 security.admin_password = "$__file{${config.sops.secrets."grafana-admin-password".path}}";
154 security.secret_key = "$__file{${config.sops.secrets."grafana-secret-key".path}}";
155 };
154 }; 156 };
155 sops.secrets."grafana-admin-password" = { 157 sops.secrets."grafana-admin-password" = {
156 format = "binary"; 158 format = "binary";
diff --git a/overlays/matrix-synapse/1.70.1/default.nix b/overlays/matrix-synapse/1.70.1/default.nix
deleted file mode 100644
index 0c026914..00000000
--- a/overlays/matrix-synapse/1.70.1/default.nix
+++ /dev/null
@@ -1,111 +0,0 @@
1{ lib, stdenv, fetchFromGitHub, python3, openssl, rustPlatform
2, enableSystemd ? stdenv.isLinux, nixosTests
3, enableRedis ? true
4, callPackage
5}:
6
7let
8 plugins = python3.pkgs.callPackage ./plugins { };
9 tools = callPackage ./tools { };
10in
11with python3.pkgs;
12buildPythonApplication rec {
13 pname = "matrix-synapse";
14 version = "1.70.1";
15 format = "pyproject";
16
17 src = fetchFromGitHub {
18 owner = "matrix-org";
19 repo = "synapse";
20 rev = "v${version}";
21 hash = "sha256-/clEY3sabaDEOAAowQ896vYOvzf5Teevoa7ZkzWw+fY=";
22 };
23
24 cargoDeps = rustPlatform.fetchCargoTarball {
25 inherit src;
26 name = "${pname}-${version}";
27 hash = "sha256-9wxWxrn+uPcz60710DROhDqNC6FvTtnqzWiWRk8kl6A=";
28 };
29
30 postPatch = ''
31 # Remove setuptools_rust from runtime dependencies
32 # https://github.com/matrix-org/synapse/blob/v1.69.0/pyproject.toml#L177-L185
33 sed -i '/^setuptools_rust =/d' pyproject.toml
34 '';
35
36 nativeBuildInputs = [
37 poetry-core
38 rustPlatform.cargoSetupHook
39 setuptools-rust
40 ] ++ (with rustPlatform.rust; [
41 cargo
42 rustc
43 ]);
44
45 buildInputs = [ openssl ];
46
47 propagatedBuildInputs = [
48 authlib
49 bcrypt
50 bleach
51 canonicaljson
52 daemonize
53 frozendict
54 ijson
55 jinja2
56 jsonschema
57 lxml
58 matrix-common
59 msgpack
60 netaddr
61 phonenumbers
62 pillow
63 prometheus-client
64 psutil
65 psycopg2
66 pyasn1
67 pydantic
68 pyjwt
69 pymacaroons
70 pynacl
71 pyopenssl
72 pysaml2
73 pyyaml
74 requests
75 setuptools
76 signedjson
77 sortedcontainers
78 treq
79 twisted
80 typing-extensions
81 unpaddedbase64
82 ] ++ lib.optional enableSystemd systemd
83 ++ lib.optionals enableRedis [ hiredis txredisapi ];
84
85 checkInputs = [ mock parameterized openssl ];
86
87 doCheck = !stdenv.isDarwin;
88
89 checkPhase = ''
90 runHook preCheck
91
92 # remove src module, so tests use the installed module instead
93 rm -rf ./synapse
94
95 PYTHONPATH=".:$PYTHONPATH" ${python3.interpreter} -m twisted.trial -j $NIX_BUILD_CORES tests
96
97 runHook postCheck
98 '';
99
100 passthru.tests = { inherit (nixosTests) matrix-synapse; };
101 passthru.plugins = plugins;
102 passthru.tools = tools;
103 passthru.python = python3;
104
105 meta = with lib; {
106 homepage = "https://matrix.org";
107 description = "Matrix reference homeserver";
108 license = licenses.asl20;
109 maintainers = teams.matrix.members;
110 };
111}
diff --git a/overlays/matrix-synapse/1.70.1/plugins/default.nix b/overlays/matrix-synapse/1.70.1/plugins/default.nix
deleted file mode 100644
index e67d9075..00000000
--- a/overlays/matrix-synapse/1.70.1/plugins/default.nix
+++ /dev/null
@@ -1,8 +0,0 @@
1{ callPackage }:
2
3{
4 matrix-synapse-ldap3 = callPackage ./ldap3.nix { };
5 matrix-synapse-mjolnir-antispam = callPackage ./mjolnir-antispam.nix { };
6 matrix-synapse-pam = callPackage ./pam.nix { };
7 matrix-synapse-shared-secret-auth = callPackage ./shared-secret-auth.nix { };
8}
diff --git a/overlays/matrix-synapse/1.70.1/plugins/ldap3.nix b/overlays/matrix-synapse/1.70.1/plugins/ldap3.nix
deleted file mode 100644
index 394c0f5e..00000000
--- a/overlays/matrix-synapse/1.70.1/plugins/ldap3.nix
+++ /dev/null
@@ -1,17 +0,0 @@
1{ isPy3k, buildPythonPackage, fetchPypi, service-identity, ldap3, twisted, ldaptor, mock }:
2
3buildPythonPackage rec {
4 pname = "matrix-synapse-ldap3";
5 version = "0.1.5";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "9fdf8df7c8ec756642aa0fea53b31c0b2f1924f70d7f049a2090b523125456fe";
10 };
11
12 propagatedBuildInputs = [ service-identity ldap3 twisted ];
13
14 # ldaptor is not ready for py3 yet
15 doCheck = !isPy3k;
16 checkInputs = [ ldaptor mock ];
17}
diff --git a/overlays/matrix-synapse/1.70.1/plugins/mjolnir-antispam.nix b/overlays/matrix-synapse/1.70.1/plugins/mjolnir-antispam.nix
deleted file mode 100644
index 7372c2f7..00000000
--- a/overlays/matrix-synapse/1.70.1/plugins/mjolnir-antispam.nix
+++ /dev/null
@@ -1,32 +0,0 @@
1{ lib, buildPythonPackage, fetchFromGitHub, matrix-synapse }:
2
3buildPythonPackage rec {
4 pname = "matrix-synapse-mjolnir-antispam";
5 version = "1.5.0";
6
7 src = fetchFromGitHub {
8 owner = "matrix-org";
9 repo = "mjolnir";
10 rev = "refs/tags/v${version}";
11 sha256 = "sha256-YmP+r9W5e63Aw66lSQeTTbYwSF/vjPyHkoehJxtcRNw=";
12 };
13
14 sourceRoot = "./source/synapse_antispam";
15
16 propagatedBuildInputs = [ matrix-synapse ];
17
18 doCheck = false; # no tests
19 pythonImportsCheck = [ "mjolnir" ];
20
21 meta = with lib; {
22 description = "AntiSpam / Banlist plugin to be used with mjolnir";
23 longDescription = ''
24 Primarily meant to block invites from undesired homeservers/users,
25 Mjolnir's Synapse module is a way to interpret ban lists and apply
26 them to your entire homeserver.
27 '';
28 homepage = "https://github.com/matrix-org/mjolnir#synapse-module";
29 license = licenses.asl20;
30 maintainers = with maintainers; [ jojosch ];
31 };
32}
diff --git a/overlays/matrix-synapse/1.70.1/plugins/pam.nix b/overlays/matrix-synapse/1.70.1/plugins/pam.nix
deleted file mode 100644
index a14fe6d6..00000000
--- a/overlays/matrix-synapse/1.70.1/plugins/pam.nix
+++ /dev/null
@@ -1,15 +0,0 @@
1{ buildPythonPackage, fetchFromGitHub, twisted, python-pam }:
2
3buildPythonPackage rec {
4 pname = "matrix-synapse-pam";
5 version = "0.1.3";
6
7 src = fetchFromGitHub {
8 owner = "14mRh4X0r";
9 repo = "matrix-synapse-pam";
10 rev = "v${version}";
11 sha256 = "0jgz49cwiyih5cg3hr4byva04zjnq8aj7rima9874la9fc5sd2wf";
12 };
13
14 propagatedBuildInputs = [ twisted python-pam ];
15}
diff --git a/overlays/matrix-synapse/1.70.1/plugins/shared-secret-auth.nix b/overlays/matrix-synapse/1.70.1/plugins/shared-secret-auth.nix
deleted file mode 100644
index a6e22db3..00000000
--- a/overlays/matrix-synapse/1.70.1/plugins/shared-secret-auth.nix
+++ /dev/null
@@ -1,26 +0,0 @@
1{ lib, buildPythonPackage, fetchFromGitHub, matrix-synapse, twisted }:
2
3buildPythonPackage rec {
4 pname = "matrix-synapse-shared-secret-auth";
5 version = "2.0.2";
6
7 src = fetchFromGitHub {
8 owner = "devture";
9 repo = "matrix-synapse-shared-secret-auth";
10 rev = version;
11 sha256 = "sha256-qzXKwTEOMtdvsxoU3Xh3vQyhK+Q18LfkeSts7EyDIXE=";
12 };
13
14 doCheck = false;
15 pythonImportsCheck = [ "shared_secret_authenticator" ];
16
17 buildInputs = [ matrix-synapse ];
18 propagatedBuildInputs = [ twisted ];
19
20 meta = with lib; {
21 description = "Shared Secret Authenticator password provider module for Matrix Synapse";
22 homepage = "https://github.com/devture/matrix-synapse-shared-secret-auth";
23 license = licenses.agpl3Plus;
24 maintainers = with maintainers; [ sumnerevans ];
25 };
26}
diff --git a/overlays/matrix-synapse/1.70.1/tools/default.nix b/overlays/matrix-synapse/1.70.1/tools/default.nix
deleted file mode 100644
index defc35bc..00000000
--- a/overlays/matrix-synapse/1.70.1/tools/default.nix
+++ /dev/null
@@ -1,6 +0,0 @@
1{ callPackage }:
2{
3 rust-synapse-compress-state = callPackage ./rust-synapse-compress-state.nix { };
4
5 synadm = callPackage ./synadm.nix { };
6}
diff --git a/overlays/matrix-synapse/1.70.1/tools/rust-synapse-compress-state.nix b/overlays/matrix-synapse/1.70.1/tools/rust-synapse-compress-state.nix
deleted file mode 100644
index fcf123d6..00000000
--- a/overlays/matrix-synapse/1.70.1/tools/rust-synapse-compress-state.nix
+++ /dev/null
@@ -1,30 +0,0 @@
1{ lib, rustPlatform, python3, fetchFromGitHub, pkg-config, openssl }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "rust-synapse-compress-state";
5 version = "0.1.3";
6
7 src = fetchFromGitHub {
8 owner = "matrix-org";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-SSfVtG8kwHarVbB1O7xC2SSbUpPGYMHTMyoxu8mpEk0=";
12 };
13
14 cargoSha256 = "sha256-PG+UeovhJMsIlm5dOYdtMxbUxZjwG3V59kAcB9aFP5c=";
15
16 cargoBuildFlags = [
17 "--all"
18 ];
19
20 nativeBuildInputs = [ python3 pkg-config ];
21
22 buildInputs = [ openssl ];
23
24 meta = with lib; {
25 description = "A tool to compress some state in a Synapse instance's database";
26 homepage = "https://github.com/matrix-org/rust-synapse-compress-state";
27 license = licenses.asl20;
28 maintainers = with maintainers; [ hexa maralorn ];
29 };
30}
diff --git a/overlays/matrix-synapse/1.70.1/tools/synadm.nix b/overlays/matrix-synapse/1.70.1/tools/synadm.nix
deleted file mode 100644
index 5075e42e..00000000
--- a/overlays/matrix-synapse/1.70.1/tools/synadm.nix
+++ /dev/null
@@ -1,47 +0,0 @@
1{ lib
2, python3Packages
3}:
4
5with python3Packages; buildPythonApplication rec {
6 pname = "synadm";
7 version = "0.36";
8 format = "setuptools";
9
10 src = fetchPypi {
11 inherit pname version;
12 sha256 = "sha256-OMXUbfAC927qJw0B5sq1lGJQRkFAUdohIOkCYUbZumI=";
13 };
14
15 postPatch = ''
16 substituteInPlace setup.py \
17 --replace "Click>=7.0,<8.0" "Click"
18 '';
19
20 propagatedBuildInputs = [
21 click
22 click-option-group
23 dnspython
24 tabulate
25 pyyaml
26 requests
27 ];
28
29 checkPhase = ''
30 runHook preCheck
31 export HOME=$TMPDIR
32 $out/bin/synadm -h > /dev/null
33 runHook postCheck
34 '';
35
36 meta = with lib; {
37 description = "Command line admin tool for Synapse";
38 longDescription = ''
39 A CLI tool to help admins of Matrix Synapse homeservers
40 conveniently issue commands available via its admin API's
41 (matrix-org/synapse@master/docs/admin_api)
42 '';
43 homepage = "https://github.com/JOJ0/synadm";
44 license = licenses.gpl3Plus;
45 maintainers = with maintainers; [ hexa ];
46 };
47}
diff --git a/overlays/matrix-synapse/default.nix b/overlays/matrix-synapse/default.nix
deleted file mode 100644
index 9db73e35..00000000
--- a/overlays/matrix-synapse/default.nix
+++ /dev/null
@@ -1,3 +0,0 @@
1{ final, prev, ... }: {
2 matrix-synapse = final.callPackage ./1.70.1/default.nix {};
3}
diff --git a/overlays/postfix-mta-sts-resolver.nix b/overlays/postfix-mta-sts-resolver.nix
index d8b1ff00..22fc4118 100644
--- a/overlays/postfix-mta-sts-resolver.nix
+++ b/overlays/postfix-mta-sts-resolver.nix
@@ -2,7 +2,7 @@
2{ 2{
3 postfix-mta-sts-resolver = flakeInputs.mach-nix.lib.${final.system}.buildPythonPackage { 3 postfix-mta-sts-resolver = flakeInputs.mach-nix.lib.${final.system}.buildPythonPackage {
4 inherit (sources.postfix-mta-sts-resolver) src pname version; 4 inherit (sources.postfix-mta-sts-resolver) src pname version;
5 extras = "redis,uvloop"; 5 # extras = "redis,uvloop";
6 ignoreDataOutdated = true; 6 ignoreDataOutdated = true;
7 7
8 requirements = '' 8 requirements = ''
@@ -13,17 +13,19 @@
13 PyYAML>=3.12 13 PyYAML>=3.12
14 ''; 14 '';
15 15
16 providers._default = "nixpkgs,sdist"; 16 providers.cffi = "nixpkgs";
17 17
18 overridesPost = [ 18 # providers._default = "nixpkgs,sdist";
19 (self: super: {
20 frozenlist = super.frozenlist.overrideAttrs (oldAttrs: {
21 nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ final.python310Packages.cython ];
22 });
23 })
24 ];
25 19
26 _.pyparsing.buildInputs.add = with final.python310Packages; [ flit-core ]; 20 # overridesPost = [
27 _.idna.buildInputs.add = with final.python310Packages; [ flit-core ]; 21 # (self: super: {
22 # frozenlist = super.frozenlist.overrideAttrs (oldAttrs: {
23 # nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ final.python310Packages.cython ];
24 # });
25 # })
26 # ];
27
28 # _.pyparsing.buildInputs.add = with final.python310Packages; [ flit-core ];
29 # _.idna.buildInputs.add = with final.python310Packages; [ flit-core ];
28 }; 30 };
29} 31}