Files
stubbfelnix/services/nextcloud.nix
2017-11-22 00:36:51 +01:00

37 lines
1.1 KiB
Nix

{ config, pkgs, ... }:
{
services.nginx.virtualHosts."cloud.stubbe.rocks" = {
enableACME = true;
forceSSL = true;
root = /etc/per-user-pkgs/nextcloud;
#locations."/".proxyPass = "http://unix:/run/phpfpm/nextcloud.sock";
# Path to the root of your installation
locations."/robots.txt".extraConfig = ''
allow all;
log_not_found off;
access_log off;
'';
locations."/.well-known/carddav".extraConfig = "return 301 $scheme://$host/remote.php/dav;";
locations."/.well-known/caldav".extraConfig = "return 301 $scheme://$host/remote.php/dav;";
};
users.extraUsers.nextcloud.packages = [pkgs.nextcloud];
services.phpfpm.poolConfigs = {
nextcloud = ''
listen = /run/phpfpm/nextcloud.sock
listen.group = nginx
user = nextcloud
group = nextcloud
pm = dynamic
pm.max_children = 75
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 500
'';
};
}