Separate nextcloud

This commit is contained in:
Alexander Bantyev 2020-07-31 21:00:51 +03:00
parent 6f27da1431
commit 02532d7211
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
3 changed files with 22 additions and 1 deletions

View File

@ -35,6 +35,7 @@ device:
./power.nix ./power.nix
./network.nix ./network.nix
] ++ lib.optionals (device == "AMD-Workstation") [ ] ++ lib.optionals (device == "AMD-Workstation") [
./nextcloud.nix
./mailserver.nix ./mailserver.nix
./matrix-synapse.nix ./matrix-synapse.nix
./workspace/kanshi.nix ./workspace/kanshi.nix

18
modules/nextcloud.nix Normal file
View File

@ -0,0 +1,18 @@
{ config, pkgs, lib, ... }:
{
services.nextcloud = {
enable = true;
nginx.enable = true;
hostName = "nextcloud.balsoft.ru";
config.adminpassFile = "/home/balsoft/nextcloud-admin";
package = pkgs.nextcloud19;
https = true;
};
services.nginx.virtualHosts."nextcloud.balsoft.ru" = {
enableACME = true;
forceSSL = true;
locations."/".proxyWebsockets = true;
locations."~ ^\\/(?:build|tests|config|lib|3rdparty|templates|data)\\/".proxyWebsockets = true;
locations."~ ^\\/(?:index|remote|public|cron|core/ajax\\/update|status|ocs\\/v[12]|updater\\/.+|ocs-provider\\/.+|ocm-provider\\/.+)\\.php(?:$|\\/)".proxyWebsockets = true;
};
}

View File

@ -51,7 +51,7 @@
networking.firewall.trustedInterfaces = [ "eth0" ]; networking.firewall.trustedInterfaces = [ "eth0" ];
services.nextcloud = { services.nextcloud = {
enable = true; enable = config.device == "AMD-Workstation";
nginx.enable = true; nginx.enable = true;
hostName = "nextcloud.balsoft.ru"; hostName = "nextcloud.balsoft.ru";
config.adminpassFile = "/home/balsoft/nextcloud-admin"; config.adminpassFile = "/home/balsoft/nextcloud-admin";
@ -59,6 +59,8 @@
https = true; https = true;
}; };
services.nginx.enable = config.device == "AMD-Workstation";
services.nginx.virtualHosts."nextcloud.balsoft.ru" = { services.nginx.virtualHosts."nextcloud.balsoft.ru" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;