Move server to new hardware
This commit is contained in:
parent
643c6c9e9b
commit
145297af58
32 changed files with 129 additions and 321 deletions
|
@ -1,4 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.collabora-online.enable = config.services.nextcloud.enable;
|
||||
}
|
|
@ -1,15 +1,12 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./collabora
|
||||
./nginx
|
||||
];
|
||||
imports = [ ./nginx ];
|
||||
|
||||
config = lib.mkIf config.system.fileserver.enable {
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud30;
|
||||
hostName = "cloud.nixfox.ca";
|
||||
hostName = "files.nixfox.ca";
|
||||
https = true;
|
||||
config = {
|
||||
adminuser = config.sysusers.main;
|
||||
|
@ -17,7 +14,7 @@
|
|||
};
|
||||
settings = {
|
||||
trusted_proxies = [ "127.0.0.1" ];
|
||||
trusted_domains = [ "cloud.nixfox.ca" ];
|
||||
trusted_domains = [ "files.nixfox.ca" ];
|
||||
overwriteprotocol = "https";
|
||||
mail_smtphost = "mx.nixfox.ca";
|
||||
mail_domain = "nixfox.ca";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."cloud.nixfox.ca" = lib.mkIf config.services.nextcloud.enable {
|
||||
services.nginx.virtualHosts."files.nixfox.ca" = lib.mkIf config.services.nextcloud.enable {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
locations."/" = {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
{
|
||||
imports = [
|
||||
./mastodon
|
||||
./matrix
|
||||
./owncast
|
||||
#./spacebar
|
||||
];
|
||||
|
||||
options.system.socialserver.enable = lib.mkEnableOption "Enable social media like services";
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./element
|
||||
./synapse
|
||||
];
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ ./nginx ];
|
||||
|
||||
config = lib.mkIf config.services.matrix-synapse.enable {
|
||||
nixpkgs.config.element-web.conf = {
|
||||
default_server_config."m.homeserver" = {
|
||||
base_url = "https://matrix.nixfox.ca";
|
||||
server_name = "matrix.nixfox.ca";
|
||||
};
|
||||
branding = {
|
||||
auth_header_logo_url = "https://www.nixfox.ca/images/copyright/profile.png";
|
||||
#welcome_background_url = "https://www.nixfox.ca/images/backgrounds/template-background.png";
|
||||
};
|
||||
embedded_pages.home_url = "https://www.nixfox.ca/";
|
||||
disable_custom_urls = true;
|
||||
disable_guests = true;
|
||||
default_theme = "dark";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."chat.nixfox.ca" = lib.mkIf config.services.matrix-synapse.enable {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
root = "${pkgs.element-web}";
|
||||
};
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ ./nginx ];
|
||||
|
||||
config = lib.mkIf config.system.socialserver.enable {
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server_name = "nixfox.ca";
|
||||
public_baseurl = "https://matrix.nixfox.ca";
|
||||
suppress_key_server_warning = true;
|
||||
|
||||
# Email notifications about account status
|
||||
email = {
|
||||
notif_from = "NixFox Matrix <noreply@nixfox.ca>";
|
||||
smtp_host = "mx.nixfox.ca";
|
||||
smtp_user = "noreply@nixfox.ca";
|
||||
smtp_pass = config.secrets.mailPass.nixfoxNoReply;
|
||||
enable_tls = true;
|
||||
smtp_port = 587;
|
||||
require_transport_security = true;
|
||||
};
|
||||
|
||||
# Disable registration without email
|
||||
registrations_require_3pid = [ "email" ];
|
||||
|
||||
# Set the type of database
|
||||
database.name = "sqlite3";
|
||||
|
||||
# Allow account registration
|
||||
#enable_registration = true;
|
||||
|
||||
# General settings
|
||||
max_upload_size = "60M";
|
||||
burst_count = 15;
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/persist".directories = [ "/var/lib/matrix-synapse" ];
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."matrix.nixfox.ca" = lib.mkIf config.services.matrix-synapse.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations = {
|
||||
"/".extraConfig = ''return 403;'';
|
||||
"/client".proxyPass = "http://127.0.0.1:8008";
|
||||
"/_matrix".proxyPass = "http://127.0.0.1:8008";
|
||||
"/_synapse/client".proxyPass = "http://127.0.0.1:8008";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue