Added Matrix/Synapse alongside cinny
This commit is contained in:
@@ -64,6 +64,7 @@
|
|||||||
xonotic
|
xonotic
|
||||||
irssi
|
irssi
|
||||||
blender
|
blender
|
||||||
|
cinny-desktop
|
||||||
]
|
]
|
||||||
++ lib.optionals pkgs.stdenv.isDarwin [ graphite-cli ];
|
++ lib.optionals pkgs.stdenv.isDarwin [ graphite-cli ];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../nixos/roles/monitoring.nix
|
../../nixos/roles/monitoring.nix
|
||||||
|
../../nixos/roles/matrix.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|||||||
53
nixos/roles/matrix.nix
Normal file
53
nixos/roles/matrix.nix
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
networking.firewall.allowedTCPPorts = [ 8448 ];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
matrix-synapse = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
server_name = "cyperpunk.de";
|
||||||
|
public_baseurl = "http://matrix.cyperpunk.de";
|
||||||
|
listeners = [
|
||||||
|
{
|
||||||
|
port = 8008;
|
||||||
|
bind_addresses = [ "127.0.0.1" ];
|
||||||
|
type = "http";
|
||||||
|
tls = false;
|
||||||
|
x_forwarded = true;
|
||||||
|
resources = [
|
||||||
|
{
|
||||||
|
names = [
|
||||||
|
"client"
|
||||||
|
"federation"
|
||||||
|
];
|
||||||
|
compress = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nginx = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts = {
|
||||||
|
"matrix.cyperpunk.de" = {
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:8008";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_set_header Host matrix.cyperpunk.de;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"cinny.cyperpunk.de" = {
|
||||||
|
locations."/" = {
|
||||||
|
root = pkgs.cinny;
|
||||||
|
tryFiles = "$uri $uri/ /index.html";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user