3
0
Fork 0
forked from mirrors/nixpkgs

tt-rss: Fix evaluation by disabling nginx-options.

The nginx.virtualHosts option isn't merged yet. We can re-enable these
features when https://github.com/NixOS/nixpkgs/pull/15862 is merged.
This commit is contained in:
Moritz Ulrich 2016-07-22 09:53:00 +02:00
parent d271db550e
commit f8ea8c7197

View file

@ -109,15 +109,17 @@ let
''; '';
}; };
virtualHost = mkOption { # TODO: Re-enable after https://github.com/NixOS/nixpkgs/pull/15862 is merged
type = types.str;
default = "${virtualHostName}"; # virtualHost = mkOption {
description = '' # type = types.str;
Name of existing nginx virtual host that is used to run web-application. # default = "${virtualHostName}";
If not specified a host will be created automatically with # description = ''
default values. # Name of existing nginx virtual host that is used to run web-application.
''; # If not specified a host will be created automatically with
}; # default values.
# '';
# };
database = { database = {
type = mkOption { type = mkOption {
@ -465,33 +467,34 @@ let
}; };
} else {}; } else {};
# TODO: Re-enable after https://github.com/NixOS/nixpkgs/pull/15862 is merged
services.nginx.virtualHosts = if cfg.virtualHost == "${virtualHostName}" then { # services.nginx.virtualHosts = if cfg.virtualHost == "${virtualHostName}" then {
"${virtualHostName}" = { # "${virtualHostName}" = {
root = "${root}"; # root = "${root}";
extraConfig = '' # extraConfig = ''
access_log /var/log/nginx-${virtualHostName}-access.log; # access_log /var/log/nginx-${virtualHostName}-access.log;
error_log /var/log/nginx-${virtualHostName}-error.log; # error_log /var/log/nginx-${virtualHostName}-error.log;
''; # '';
locations."/" = { # locations."/" = {
extraConfig = '' # extraConfig = ''
index index.php; # index index.php;
''; # '';
}; # };
locations."~ \.php$" = { # locations."~ \.php$" = {
extraConfig = '' # extraConfig = ''
fastcgi_split_path_info ^(.+\.php)(/.+)$; # fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:${config.services.phpfpm.pools."${cfg.pool}".listen}; # fastcgi_pass unix:${config.services.phpfpm.pools."${cfg.pool}".listen};
fastcgi_index index.php; # fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME ${root}/$fastcgi_script_name; # fastcgi_param SCRIPT_FILENAME ${root}/$fastcgi_script_name;
include ${pkgs.nginx}/conf/fastcgi_params; # include ${pkgs.nginx}/conf/fastcgi_params;
''; # '';
}; # };
}; # };
} else {}; # } else {};
systemd.services.tt-rss = let systemd.services.tt-rss = let
@ -564,4 +567,3 @@ let
}; };
}; };
} }