Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. { config, lib, pkgs, ... }:
  2. with lib;
  3. with import ./lib.nix { inherit lib; };
  4. let
  5. mkVassal = {name, value}: nameValuePair name {
  6. socket = "/run/uwsgi/${name}.sock";
  7. master = true;
  8. vacuum = true;
  9.  
  10. processes = 16;
  11. cheaper = 1;
  12. php-sapi-name = "apache"; # opcode caching tweak
  13.  
  14. php-allowed-ext = [ ".php" ".inc" ];
  15. socket-modifier1 = 14;
  16. php-index = "index.php";
  17. php-set = [
  18. "date.timezone=Europe/Berlin"
  19. "opcache.enable=1"
  20. "opcache.enable_cli=1"
  21. "opcache.interned_strings_buffer=8"
  22. "opcache.max_accelerated_files=10000"
  23. "opcache.memory_consumption=128"
  24. "opcache.save_comments=1"
  25. "opcache.revalidate_freq=1"
  26. ];
  27. env = [
  28. "NEXTCLOUD_CONFIG_DIR=${value.cfg}"
  29. ];
  30. plugins = [ "php" ];
  31. type = "emperor";
  32. };
  33. in {
  34. config = {
  35. services.uwsgi = {
  36. enable = true;
  37. user = "nginx";
  38. group = "nginx";
  39. instance = {
  40. vassals = builtins.listToAttrs (map mkVassal reposData);
  41. type = "emperor";
  42. };
  43. plugins = [ "php" ];
  44. };
  45. };
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement