diff options
author | Jaakko Luttinen <jaakko.luttinen@iki.fi> | 2018-01-02 21:48:00 +0200 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2018-01-05 14:47:54 +0100 |
commit | 68855595cec81624bf3264c9adf55c5a5c8a328f (patch) | |
tree | 8a89443c2dbfdfe067d73333e86a3278c7e7a967 /nixos/modules/services/web-apps/tt-rss.nix | |
parent | 13eaae161006f21ca50821111d70ebaddbc843fc (diff) | |
download | nixpkgs-68855595cec81624bf3264c9adf55c5a5c8a328f.tar nixpkgs-68855595cec81624bf3264c9adf55c5a5c8a328f.tar.gz nixpkgs-68855595cec81624bf3264c9adf55c5a5c8a328f.tar.bz2 nixpkgs-68855595cec81624bf3264c9adf55c5a5c8a328f.tar.lz nixpkgs-68855595cec81624bf3264c9adf55c5a5c8a328f.tar.xz nixpkgs-68855595cec81624bf3264c9adf55c5a5c8a328f.tar.zst nixpkgs-68855595cec81624bf3264c9adf55c5a5c8a328f.zip |
nixos/service.tt-rss: enable nginx automatically
Diffstat (limited to 'nixos/modules/services/web-apps/tt-rss.nix')
-rw-r--r-- | nixos/modules/services/web-apps/tt-rss.nix | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/nixos/modules/services/web-apps/tt-rss.nix b/nixos/modules/services/web-apps/tt-rss.nix index a94c71a95dd..df9ebf769c7 100644 --- a/nixos/modules/services/web-apps/tt-rss.nix +++ b/nixos/modules/services/web-apps/tt-rss.nix @@ -466,25 +466,28 @@ let ''; }; - services.nginx.virtualHosts = mkIf (cfg.virtualHost != null) { - "${cfg.virtualHost}" = { - root = "${cfg.root}"; - - locations."/" = { - index = "index.php"; - }; - - locations."~ \.php$" = { - extraConfig = '' - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:${phpfpmSocketName}; - fastcgi_index index.php; - ''; + services.nginx = { + enable = true; + # NOTE: No configuration is done if not using virtual host + virtualHosts = mkIf (cfg.virtualHost != null) { + "${cfg.virtualHost}" = { + root = "${cfg.root}"; + + locations."/" = { + index = "index.php"; + }; + + locations."~ \.php$" = { + extraConfig = '' + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:${phpfpmSocketName}; + fastcgi_index index.php; + ''; + }; }; }; }; - systemd.services.tt-rss = let dbService = if cfg.database.type == "pgsql" then "postgresql.service" else "mysql.service"; in { |