feat(matrix): add appservices with signal config
This commit is contained in:
parent
c4d3003c43
commit
0849088384
72
flake.lock
72
flake.lock
|
@ -120,6 +120,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"devshell": {
|
||||
"locked": {
|
||||
"lastModified": 1642188268,
|
||||
"narHash": "sha256-DNz4xScpXIn7rSDohdayBpPR9H9OWCMDOgTYegX081k=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "696acc29668b644df1740b69e1601119bf6da83b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fenix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -175,6 +190,22 @@
|
|||
}
|
||||
},
|
||||
"flake-compat_3": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1641205782,
|
||||
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_4": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
|
@ -291,6 +322,44 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"matrix-appservices": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat_3",
|
||||
"nixlib": "nixlib",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1683490239,
|
||||
"narHash": "sha256-QKzpvl2XrqbobWq/I/smDa9hEniwctjJybXPVILHP0w=",
|
||||
"owner": "coffeetables",
|
||||
"repo": "nix-matrix-appservices",
|
||||
"rev": "e795d2fbc61da45d49802bb3e8f8d0c70ddc1e68",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "coffeetables",
|
||||
"repo": "nix-matrix-appservices",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1643502816,
|
||||
"narHash": "sha256-Wrbt6Gs+hjXD3HUICPBJHKnHEUqiyx8rzHCgvqC1Bok=",
|
||||
"owner": "divnix",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "ebed7ec5bcb5d01e298535989c6c321df18b631a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "divnix",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1690200740,
|
||||
|
@ -373,7 +442,7 @@
|
|||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-compat": "flake-compat_4",
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
|
@ -407,6 +476,7 @@
|
|||
"flake-parts": "flake-parts",
|
||||
"flake-utils": "flake-utils",
|
||||
"home-manager": "home-manager_2",
|
||||
"matrix-appservices": "matrix-appservices",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
|
|
|
@ -44,6 +44,11 @@
|
|||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
|
||||
matrix-appservices = {
|
||||
url = "gitlab:coffeetables/nix-matrix-appservices";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nvim-kitty-navigator = {
|
||||
url = "github:hermitmaster/nvim-kitty-navigator";
|
||||
flake = false;
|
||||
|
@ -68,6 +73,7 @@
|
|||
imports = [
|
||||
nixosModules.flakeDefaults
|
||||
agenix.nixosModules.default
|
||||
inputs.matrix-appservices.nixosModule
|
||||
hardwareConfig
|
||||
config
|
||||
];
|
||||
|
|
45
services/matrix/appservices.nix
Normal file
45
services/matrix/appservices.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let inherit (config.services.matrix-conduit.settings.global) server_name;
|
||||
in {
|
||||
# Mautrix-signal settings
|
||||
services.signald.enable = true;
|
||||
systemd.services.matrix-as-signal = {
|
||||
requires = [ "signald.service" ];
|
||||
after = [ "signald.service" ];
|
||||
path = [
|
||||
pkgs.ffmpeg # voice messages need `ffmpeg`
|
||||
];
|
||||
};
|
||||
|
||||
services.matrix-appservices = {
|
||||
addRegistrationFiles = false;
|
||||
homeserverDomain = server_name;
|
||||
homeserverURL = "https://matrix.${server_name}";
|
||||
services = {
|
||||
signal = {
|
||||
port = 29184;
|
||||
format = "mautrix-python";
|
||||
package = pkgs.unstable.mautrix-signal;
|
||||
serviceConfig = {
|
||||
StateDirectory = [ "matrix-as-signal" ];
|
||||
SupplementaryGroups = [ "signald" ];
|
||||
};
|
||||
settings.signal = {
|
||||
socket_path = config.services.signald.socketPath;
|
||||
outgoing_attachment_dir = "/var/lib/signald/tmp";
|
||||
};
|
||||
settings.bridge.permissions = {
|
||||
"@felschr:${server_name}" = "admin";
|
||||
"@felschr:matrix.org" = "admin";
|
||||
};
|
||||
settings.bridge.encryption = {
|
||||
allow = true;
|
||||
default = true;
|
||||
key_sharing.allow = true;
|
||||
delete_keys.delete_outdated_inbound = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./conduit.nix ./element.nix ];
|
||||
imports = [ ./conduit.nix ./element.nix ./appservices.nix ];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue