sliding-sync: remove
This commit is contained in:
parent
8f97b01e8b
commit
d2c5b61c8e
@ -359,8 +359,6 @@
|
||||
promnesia = upkgs.python3Packages.callPackage ./pkgs/promnesia.nix {
|
||||
inherit upkgs;
|
||||
};
|
||||
sliding-sync =
|
||||
spkgs.callPackage ./pkgs/sliding-sync.nix { inherit spkgs; };
|
||||
gokrazy = upkgs.callPackage ./pkgs/gokrazy.nix { inherit upkgs; };
|
||||
gosignify = spkgs.callPackage ./pkgs/gosignify.nix { inherit spkgs; };
|
||||
gotosocial =
|
||||
|
@ -8,7 +8,6 @@ with pkgs; let
|
||||
maxUploadSize = "150M";
|
||||
gqrss = callPackage ../../pkgs/gqrss.nix { inherit isUnstable; };
|
||||
icbirc = callPackage ../../pkgs/icbirc.nix { inherit isUnstable; };
|
||||
slidingSyncPkg = callPackage ../../pkgs/sliding-sync.nix { };
|
||||
weepushover =
|
||||
python3Packages.callPackage ../../pkgs/weepushover.nix { inherit pkgs; };
|
||||
pgBackupDir = "/var/backups/postgresql";
|
||||
@ -44,13 +43,6 @@ with pkgs; let
|
||||
mkMatrixWellKnown = p: ''
|
||||
return 200 '${builtins.toJSON p}';
|
||||
'';
|
||||
|
||||
mkMatrixSliderLoc = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://${config.services.sliding-sync.address}:${
|
||||
toString config.services.sliding-sync.port
|
||||
}";
|
||||
};
|
||||
mkMatrixLoc = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://${mtxCfg.address}:${toString mtxCfg.port}";
|
||||
@ -142,11 +134,6 @@ in
|
||||
mode = "400";
|
||||
sopsFile = config.xin-secrets.h.secrets.services;
|
||||
};
|
||||
sliding_sync_env = {
|
||||
owner = config.services.sliding-sync.user;
|
||||
mode = "400";
|
||||
sopsFile = config.xin-secrets.h.secrets.services;
|
||||
};
|
||||
pr_status_env = {
|
||||
mode = "400";
|
||||
owner = config.services.ts-reverse-proxy.servers."pr-status-reverse".user;
|
||||
@ -366,11 +353,6 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
sliding-sync = {
|
||||
enable = true;
|
||||
server = "https://tapenet.org";
|
||||
package = slidingSyncPkg;
|
||||
};
|
||||
pots = {
|
||||
enable = true;
|
||||
envFile = "${config.sops.secrets.pots_env_file.path}";
|
||||
@ -835,22 +817,7 @@ in
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
// (if config.services.sliding-sync.enable
|
||||
then {
|
||||
"/.well-known/matrix/client".extraConfig =
|
||||
mkMatrixWellKnown matrixClientConfig;
|
||||
"/.well-known/matrix/server".extraConfig =
|
||||
mkMatrixWellKnown matrixServerConfig;
|
||||
|
||||
"/client" = mkMatrixSliderLoc;
|
||||
"/_matrix/client/unstable/org.matrix.msc3575/sync" =
|
||||
mkMatrixSliderLoc;
|
||||
|
||||
"/_matrix" = mkMatrixLoc;
|
||||
"/_synapse/client" = mkMatrixLoc;
|
||||
}
|
||||
else {
|
||||
"/.well-known/matrix/client".extraConfig =
|
||||
mkMatrixWellKnown matrixClientConfig;
|
||||
"/.well-known/matrix/server".extraConfig =
|
||||
@ -858,7 +825,7 @@ in
|
||||
|
||||
"/_matrix" = mkMatrixLoc;
|
||||
"/_synapse/client" = mkMatrixLoc;
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -5,7 +5,6 @@
|
||||
./gotosocial.nix
|
||||
./lock-action.nix
|
||||
./rtlamr2mqtt.nix
|
||||
./sliding-sync.nix
|
||||
./ssh-fido-agent.nix
|
||||
./tsvnstat.nix
|
||||
./veilid-server.nix
|
||||
|
@ -1,104 +0,0 @@
|
||||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.sliding-sync;
|
||||
in
|
||||
{
|
||||
options = with lib; {
|
||||
services.sliding-sync = {
|
||||
enable = lib.mkEnableOption "Enable sliding-sync";
|
||||
|
||||
user = mkOption {
|
||||
type = with types; oneOf [ str int ];
|
||||
default = "syncv3";
|
||||
description = ''
|
||||
The user the service will use.
|
||||
'';
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = with types; oneOf [ str int ];
|
||||
default = "syncv3";
|
||||
description = ''
|
||||
The group the service will use.
|
||||
'';
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/sliding-sync";
|
||||
description = "Path sliding-sync home directory";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.sliding-sync;
|
||||
defaultText = literalExpression "pkgs.sliding-sync";
|
||||
description = "The package to use for sliding-sync";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = 8098;
|
||||
description = "The port sliding-sync should listen on.";
|
||||
};
|
||||
|
||||
address = mkOption {
|
||||
type = types.str;
|
||||
default = "127.0.0.1";
|
||||
description = "The address sliding-sync should listen on.";
|
||||
};
|
||||
|
||||
server = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
description = "The matrix server to talk to.";
|
||||
};
|
||||
|
||||
envFile = mkOption {
|
||||
type = types.path;
|
||||
default = "/run/secrets/sliding_sync_env";
|
||||
description = ''
|
||||
Path to a file containing the sliding-sync secret information.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.groups.${cfg.group} = { };
|
||||
users.users.${cfg.user} = {
|
||||
description = "sliding-sync service user";
|
||||
isSystemUser = true;
|
||||
home = "${cfg.dataDir}";
|
||||
createHome = true;
|
||||
group = "${cfg.group}";
|
||||
};
|
||||
|
||||
systemd.services.sliding-sync = {
|
||||
enable = true;
|
||||
description = "sliding-sync server";
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" "matrix-synapse.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
|
||||
environment = {
|
||||
HOME = "${cfg.dataDir}";
|
||||
SYNCV3_BINDADDR = "${cfg.address}:${toString cfg.port}";
|
||||
SYNCV3_SERVER = cfg.server;
|
||||
};
|
||||
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
|
||||
ExecStart = "${cfg.package}/bin/syncv3";
|
||||
EnvironmentFile = cfg.envFile;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, ...
|
||||
}:
|
||||
with lib;
|
||||
buildGoModule rec {
|
||||
pname = "sliding-sync";
|
||||
version = "0.99.19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "matrix-org";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-w4VL+MioNeJ/R48Ln9tYaqlfg7NvT3mQs0dWOZTHQK4=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-THjvc0TepIBFOTte7t63Dmadf3HMuZ9m0YzQMI5e5Pw=";
|
||||
|
||||
# Note: tests require a postgres install accessible to the current user
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "An implementation of MSC3575";
|
||||
homepage = "https://github.com/matrix-org/sliding-sync";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ qbit ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user