Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { config, lib, pkgs, ... }:
- with lib;
- with import ./lib.nix { inherit lib; };
- let
- mkVassal = {name, value}: nameValuePair name {
- socket = "/run/uwsgi/${name}.sock";
- master = true;
- vacuum = true;
- processes = 16;
- cheaper = 1;
- php-sapi-name = "apache"; # opcode caching tweak
- php-allowed-ext = [ ".php" ".inc" ];
- socket-modifier1 = 14;
- php-index = "index.php";
- php-set = [
- "date.timezone=Europe/Berlin"
- "opcache.enable=1"
- "opcache.enable_cli=1"
- "opcache.interned_strings_buffer=8"
- "opcache.max_accelerated_files=10000"
- "opcache.memory_consumption=128"
- "opcache.save_comments=1"
- "opcache.revalidate_freq=1"
- ];
- env = [
- "NEXTCLOUD_CONFIG_DIR=${value.cfg}"
- ];
- plugins = [ "php" ];
- type = "emperor";
- };
- in {
- config = {
- services.uwsgi = {
- enable = true;
- user = "nginx";
- group = "nginx";
- instance = {
- vassals = builtins.listToAttrs (map mkVassal reposData);
- type = "emperor";
- };
- plugins = [ "php" ];
- };
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement