Skip to content

Commit

Permalink
wip: broken
Browse files Browse the repository at this point in the history
  • Loading branch information
Anish Lakhwara committed Aug 31, 2023
1 parent 147c8ac commit 713e6c8
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions modules/flarum.nix
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ in {
services.nginx = {
enable = true;
virtualHosts."${cfg.domain}" = {
root = "${cfg.stateDir}/build/public";
locations."~ .php$".extraConfig = ''
fastcgi_pass unix:${config.services.phpfpm.pools.flarum.socket};
fastcgi_index site.php;
'';
root = "${cfg.stateDir}";
# 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 @@ -202,12 +202,13 @@ in {
ln -sf ${cfg.package}/build/vendor .
ln -sf ${cfg.package}/build/public/index.php public/
chmod a+x . public
'' + lib.optionalString
(cfg.createDatabaseLocally && cfg.database.driver == "mysql") ''
cp ${flarumInstallConfig} .
php flarum migrate
php flarum cache:clear
'';
'';
# + lib.optionalString
# (cfg.createDatabaseLocally && cfg.database.driver == "mysql") ''
# cp ${flarumInstallConfig} .
# php flarum migrate
# php flarum cache:clear
# '';
};
};
}

0 comments on commit 713e6c8

Please sign in to comment.