let
cfg = config.myServices.websites.richie.production;
vardir = "/var/lib/richie_production";
- richieSrc = pkgs.stdenv.mkDerivation (pkgs.mylibs.fetchedGitPrivate ./richie.json // {
+ richieSrc = pkgs.stdenv.mkDerivation rec {
+ version = pkgs.sources.websites-richie-app.version;
+ pname = "richie";
+ name = "${pname}-${version}";
+ src = pkgs.sources.websites-richie-app;
phases = "installPhase";
installPhase = ''
cp -a $src $out
ln -sf ${vardir}/photos $out/
sed -i "s@localedef --list-archive@localedef --list-archive /run/current-system/sw/lib/locale/locale-archive@" $out/admin/parametres.php
'';
- });
- webappdir = config.services.websites.webappDirsPaths.richie_production;
+ };
secretPath = config.secrets.fullPaths."websites/richie/production";
apacheUser = config.services.httpd.Prod.user;
apacheGroup = config.services.httpd.Prod.group;
{
options.myServices.websites.richie.production.enable = lib.mkEnableOption "enable Richie's website";
config = lib.mkIf cfg.enable {
- services.duplyBackup.profiles.richie_production.rootDir = vardir;
services.webstats.sites = [ { name = "europe-richie.org"; } ];
- secrets.keys = [{
- dest = "websites/richie/production";
+ secrets.keys."websites/richie/production" = {
user = apacheUser;
group = apacheGroup;
permissions = "0400";
$smtp_mailer->Auth('${smtp_mailer.user}', '${smtp_mailer.password}');
?>
'';
- }];
- services.websites.webappDirs.richie_production = richieSrc;
+ };
system.activationScripts.richie_production = {
deps = [ "httpd" ];
text = ''
};
phpOptions = config.services.phpfpm.phpOptions + ''
date.timezone = 'Europe/Paris'
- extension=${pkgs.php}/lib/php/extensions/mysqli.so
'';
+ phpPackage = pkgs.php72;
};
services.websites.env.production.modules = [ "proxy_fcgi" ];
services.websites.env.production.vhostConfs.richie_production = {
addToCerts = true;
certMainHost = "europe-richie.org";
hosts = [ "europe-richie.org" "www.europe-richie.org" ];
- root = webappdir;
+ root = richieSrc;
extraConfig = [
''
Use Stats europe-richie.org
<LocationMatch "^/files/.*/admin/">
Require all denied
</LocationMatch>
- <Directory ${webappdir}>
+ <Directory ${richieSrc}>
DirectoryIndex index.php index.htm index.html
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None