upgrade nixos, teamspeak nextcloud

This commit is contained in:
stubbfel
2018-10-26 01:28:24 +02:00
parent 3891bdca58
commit 037f15e237
4 changed files with 56 additions and 6 deletions

View File

@@ -74,7 +74,7 @@ calibreWithRecipes = pkgs.calibre.overrideAttrs (oldAttrs: rec {
buildInputs = (remove pkgs.python2Packages.odfpy oldAttrs.buildInputs) ++ [odfpyNoTest]; buildInputs = (remove pkgs.python2Packages.odfpy oldAttrs.buildInputs) ++ [odfpyNoTest];
# patches = oldAttrs.patches ++ [./calibre-disable_plugins.patch]; # patches = oldAttrs.patches ++ [./calibre-disable_plugins.patch];
patches = [./calibre-disable_plugins.patch]; # patches = [./calibre-disable_plugins.patch];
}); });

View File

@@ -8,7 +8,7 @@
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableAutosuggestions = true; autosuggestions.enable = true;
enableCompletion = true; enableCompletion = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
interactiveShellInit = '' interactiveShellInit = ''

View File

@@ -11,9 +11,22 @@
root = "/var/www/nextcloud/"; root = "/var/www/nextcloud/";
extraConfig = '' extraConfig = ''
client_max_body_size 1024M; client_max_body_size 1024M;
gzip off; fastcgi_buffers 64 4K;
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
error_page 403 /core/templates/403.php; error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php; error_page 404 /core/templates/404.php;
add_header Strict-Transport-Security "max-age=31536000;includeSubDomains";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Referrer-Policy no-referrer;
''; '';
locations = { locations = {
@@ -39,16 +52,47 @@
include ${pkgs.nginx}/conf/fastcgi_params; include ${pkgs.nginx}/conf/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass unix:/run/phpfpm/nextcloud.sock; fastcgi_pass unix:/run/phpfpm/nextcloud.sock;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
''; '';
}; };
"~ ^/(?:updater|ocs-provider)(?:$|/)" = {
tryFiles = "$uri/ =404";
index = "index.php";
};
# CSS and JavaScript files # CSS and JavaScript files
"~* ^/(?!apps-local).*\\.(?:css|js)$" = { "~* ^/(?!apps-local).*\\.(?:css|js)$" = {
tryFiles = "$uri /index.php$uri$is_args$args"; tryFiles = "$uri /index.php$request_uri";
extraConfig = ''
add_header Cache-Control "public, max-age=15778463";
add_header Strict-Transport-Security "max-age=31536000;includeSubDomains";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Referrer-Policy no-referrer;
'';
}; };
# Other static assets # Other static assets
"~* ^/(?!apps-local).*\\.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$" = { "~* ^/(?!apps-local).*\\.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$" = {
tryFiles = "$uri /index.php$uri$is_args$args"; tryFiles = "$uri /index.php$request_uri";
extraConfig = ''
add_header Cache-Control "public, max-age=15778463";
add_header Strict-Transport-Security "max-age=31536000;includeSubDomains";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Referrer-Policy no-referrer;
'';
}; };
# Locally installed apps: # Locally installed apps:
# #

View File

@@ -1,5 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
in
{ {
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
30033 # ts TCP port opened for file transfers. 30033 # ts TCP port opened for file transfers.
@@ -10,6 +12,10 @@
9987 # ts port 9987 # ts port
]; ];
nixpkgs.config.packageOverrides = pkgs: {
teamspeak_server = unstable.teamspeak_server;
};
services.teamspeak3= { services.teamspeak3= {
enable = true; enable = true;
}; };