nixos/service.tt-rss: enable nginx automatically

authored by Jaakko Luttinen and committed by Robin Gloster 68855595 13eaae16

+16 -13
+16 -13
nixos/modules/services/web-apps/tt-rss.nix
··· 466 466 ''; 467 467 }; 468 468 469 - services.nginx.virtualHosts = mkIf (cfg.virtualHost != null) { 470 - "${cfg.virtualHost}" = { 471 - root = "${cfg.root}"; 469 + services.nginx = { 470 + enable = true; 471 + # NOTE: No configuration is done if not using virtual host 472 + virtualHosts = mkIf (cfg.virtualHost != null) { 473 + "${cfg.virtualHost}" = { 474 + root = "${cfg.root}"; 472 475 473 - locations."/" = { 474 - index = "index.php"; 475 - }; 476 + locations."/" = { 477 + index = "index.php"; 478 + }; 476 479 477 - locations."~ \.php$" = { 478 - extraConfig = '' 479 - fastcgi_split_path_info ^(.+\.php)(/.+)$; 480 - fastcgi_pass unix:${phpfpmSocketName}; 481 - fastcgi_index index.php; 482 - ''; 480 + locations."~ \.php$" = { 481 + extraConfig = '' 482 + fastcgi_split_path_info ^(.+\.php)(/.+)$; 483 + fastcgi_pass unix:${phpfpmSocketName}; 484 + fastcgi_index index.php; 485 + ''; 486 + }; 483 487 }; 484 488 }; 485 489 }; 486 - 487 490 488 491 systemd.services.tt-rss = let 489 492 dbService = if cfg.database.type == "pgsql" then "postgresql.service" else "mysql.service";