Tilføj Element som et tjeneste
Skamløst hugget fra min egen config (bare uden Jitsi, for det har fricloud ikke. rend.al > fricloud.dk)
This commit is contained in:
parent
692620ab4b
commit
61224dbc26
1 changed files with 44 additions and 0 deletions
44
machines/gerd/services/element.nix
Normal file
44
machines/gerd/services/element.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
svc_domain = ".${config.mine.shared.settings.domain}";
|
||||
pkg_element = pkgs.element-web.override {
|
||||
conf = {
|
||||
brand = "Fricloud chat";
|
||||
default_server_config = {
|
||||
"m.homeserver" = {
|
||||
"base_url" = "https://fricloud.dk";
|
||||
server_name = "fricloud.dk";
|
||||
};
|
||||
"m.identity_server" = {
|
||||
"base_url" = "https://vector.im";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in {
|
||||
services.nginx.virtualHosts."${svc_domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/". = {
|
||||
alias = "${pkg_element}/";
|
||||
index = "index.html";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
mine.shared.meta.element = {
|
||||
name = "Element";
|
||||
description = "We host our own Element instance.";
|
||||
url = "https://${svc_domain}";
|
||||
|
||||
package = let
|
||||
pkg = pkg_element;
|
||||
in {
|
||||
name = pkg.pname;
|
||||
version = pkg.version;
|
||||
meta = pkg.meta;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue