nixos/service.tt-rss: enable nginx automatically
This commit is contained in:
parent
13eaae1610
commit
68855595ce
@ -466,25 +466,28 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts = mkIf (cfg.virtualHost != null) {
|
services.nginx = {
|
||||||
"${cfg.virtualHost}" = {
|
enable = true;
|
||||||
root = "${cfg.root}";
|
# NOTE: No configuration is done if not using virtual host
|
||||||
|
virtualHosts = mkIf (cfg.virtualHost != null) {
|
||||||
|
"${cfg.virtualHost}" = {
|
||||||
|
root = "${cfg.root}";
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
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:${phpfpmSocketName};
|
fastcgi_pass unix:${phpfpmSocketName};
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
systemd.services.tt-rss = let
|
systemd.services.tt-rss = let
|
||||||
dbService = if cfg.database.type == "pgsql" then "postgresql.service" else "mysql.service";
|
dbService = if cfg.database.type == "pgsql" then "postgresql.service" else "mysql.service";
|
||||||
in {
|
in {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user