Skip to content

Commit

Permalink
wip 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Anish Lakhwara committed Sep 14, 2023
1 parent 0cc51b0 commit 8c469af
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/flarum.nix
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ in {
services.nginx = {
enable = true;
virtualHosts."${cfg.domain}" = {
root = "${cfg.stateDir}";
locations."~ .php$".extraConfig = ''
root = "${cfg.stateDir}/public";
locations."~ \.php$".extraConfig = ''
fastcgi_pass unix:${config.services.phpfpm.pools.flarum.socket};
fastcgi_index site.php;
'';
extraConfig = ''
index index.php
include ${cfg.package}/build/.nginx.conf;
autoindex on;
'';
};
};
Expand Down Expand Up @@ -200,6 +200,7 @@ in {
ln -sf ${cfg.package}/build/vendor .
ln -sf ${cfg.package}/build/public/index.php public/
chmod a+x . public
chmod +x site.php extend.php flarum
'' + lib.optionalString
(cfg.createDatabaseLocally && cfg.database.driver == "mysql") ''
if [ ! -f config.php ]; then
Expand Down

0 comments on commit 8c469af

Please sign in to comment.