my nixos config
0
fork

Configure Feed

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

remove services.matrix-sliding-sync (not sure if it was ever needed)

chfour 7b4fd3af 4a443749

+3 -38
+3 -38
machines/fovps/services/synapse.nix
··· 4 4 let 5 5 domain = "eeep.ee"; 6 6 synapsePort = 8008; # todo: unix socket maybe? 7 - slidingPort = 8009; 8 7 9 8 synapse = config.services.matrix-synapse; 10 9 synapseUnit = config.systemd.services.matrix-synapse.serviceConfig; ··· 22 21 # automatically created 23 22 registration_shared_secret_path = "${synapse.dataDir}/.env.synapse-reg"; 24 23 }; 25 - 24 + 26 25 #services.coturn = { 27 26 # enable = true; 28 27 # use-auth-secret = true; 29 28 # static-auth-secret-file = ""; 30 29 #}; 31 - 30 + 32 31 services.matrix-synapse.settings.database.name = "psycopg2"; 33 32 services.postgresql = let args = synapse.settings.database.args; in { 34 33 enable = true; ··· 37 36 ensureUsers = [ { name = args.user; ensureDBOwnership = true; } ]; 38 37 }; 39 38 40 - services.matrix-sliding-sync = { 41 - enable = true; 42 - createDatabase = true; 43 - settings = { 44 - SYNCV3_SERVER = "https://localhost:${toString synapsePort}"; 45 - SYNCV3_BINDADDR = "127.0.0.1:${toString slidingPort}"; 46 - }; 47 - # https://stackoverflow.com/questions/42835750/systemd-script-environment-file-updated-by-execstartpre 48 - environmentFile = "${synapseUnit.WorkingDirectory}/.env.sliding-sync"; 49 - }; 50 - systemd.services.matrix-sliding-sync = rec { 51 - preStart = let 52 - envFile = config.services.matrix-sliding-sync.environmentFile; 53 - in '' 54 - if ! [ -f "${envFile}" ]; then 55 - echo -n 'SYNCV3_SECRET=' > ${envFile} 56 - ${pkgs.openssl}/bin/openssl rand -hex 64 >> ${envFile} 57 - fi 58 - ''; 59 - serviceConfig = { 60 - DynamicUser = lib.mkForce false; 61 - User = synapseUnit.User; 62 - Group = synapseUnit.Group; 63 - WorkingDirectory = lib.mkForce synapseUnit.WorkingDirectory; 64 - StateDirectory = lib.mkForce ""; 65 - EnvironmentFile = lib.mkForce "-${config.services.matrix-sliding-sync.environmentFile}"; 66 - }; 67 - }; 68 - 69 39 services.matrix-synapse.settings.listeners = [ 70 40 { 71 41 bind_addresses = [ "127.0.0.1" ]; 72 42 port = synapsePort; 73 43 resources = [ 74 - { 75 - compress = false; 76 - names = [ "client" "federation" ]; 77 - } 44 + { compress = false; names = [ "client" "federation" ]; } 78 45 ]; 79 46 tls = false; 80 47 type = "http"; ··· 85 52 services.caddy.virtualHosts."${domain}".extraConfig = '' 86 53 reverse_proxy /_matrix/* localhost:${toString synapsePort} 87 54 reverse_proxy /_synapse/client/* localhost:${toString synapsePort} 88 - 89 - reverse_proxy /_matrix/client/unstable/org.matrix.msc3575/sync localhost:${toString slidingPort} 90 55 ''; 91 56 services.caddy.virtualHosts."https://${domain}:8448".extraConfig = '' 92 57 reverse_proxy /_matrix/* localhost:${toString synapsePort}