Add element config
This commit is contained in:
parent
e0c49cfc27
commit
a898f6c684
3 changed files with 37 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
admin = ./admin.nix;
|
admin = ./admin.nix;
|
||||||
backup = ./backup.nix;
|
backup = ./backup.nix;
|
||||||
homePage = ./homepage.nix;
|
homePage = ./homepage.nix;
|
||||||
|
element = ./element.nix;
|
||||||
fido2 = ./fido2.nix;
|
fido2 = ./fido2.nix;
|
||||||
fileShare = ./fileShare.nix;
|
fileShare = ./fileShare.nix;
|
||||||
networking = ./networking.nix;
|
networking = ./networking.nix;
|
||||||
|
|
35
modules/element.nix
Normal file
35
modules/element.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.dadada.element;
|
||||||
|
in {
|
||||||
|
options.dadada.element = {
|
||||||
|
enable = lib.mkEnableOption "Enable element webapp";
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.nginx.virtualHosts."element.${config.networking.domain}" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
serverAliases = [
|
||||||
|
"element.${config.networking.domain}"
|
||||||
|
];
|
||||||
|
|
||||||
|
root = pkgs.element-web.override {
|
||||||
|
conf = {
|
||||||
|
default_server_config."m.homeserver" = {
|
||||||
|
"base_url" = "matrix.stratum0.org";
|
||||||
|
"server_name" = "Stratum 0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
locations = {
|
||||||
|
"/robots.txt" = {
|
||||||
|
extraConfig = ''
|
||||||
|
add_header Content-Type text/plain;
|
||||||
|
return 200 "User-agent: *\nDisallow: /\n";
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
[
|
[
|
||||||
./admin.nix
|
./admin.nix
|
||||||
./backup.nix
|
./backup.nix
|
||||||
|
./element.nix
|
||||||
./fido2.nix
|
./fido2.nix
|
||||||
./fileShare.nix
|
./fileShare.nix
|
||||||
./homepage.nix
|
./homepage.nix
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue