X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Frichie%2Fproduction.nix;h=a548cff21a4d8117adc5f954c01c34c4ca52f309;hb=38aa1e335aa12849d2e54cd075f353c18678f014;hp=94c0ca02f8c3fd45f5740449d9eda22e9eb2c8fd;hpb=dcac3ec730176549cd52a9a42db2001dc652c30d;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/richie/production.nix b/modules/private/websites/richie/production.nix index 94c0ca0..a548cff 100644 --- a/modules/private/websites/richie/production.nix +++ b/modules/private/websites/richie/production.nix @@ -2,7 +2,11 @@ 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 @@ -12,8 +16,7 @@ let 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; @@ -21,11 +24,9 @@ in { 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"; @@ -43,8 +44,7 @@ in $smtp_mailer->Auth('${smtp_mailer.user}', '${smtp_mailer.password}'); ?> ''; - }]; - services.websites.webappDirs.richie_production = richieSrc; + }; system.activationScripts.richie_production = { deps = [ "httpd" ]; text = '' @@ -72,7 +72,6 @@ in }; phpOptions = config.services.phpfpm.phpOptions + '' date.timezone = 'Europe/Paris' - extension=${pkgs.php72}/lib/php/extensions/mysqli.so ''; phpPackage = pkgs.php72; }; @@ -82,7 +81,7 @@ in addToCerts = true; certMainHost = "europe-richie.org"; hosts = [ "europe-richie.org" "www.europe-richie.org" ]; - root = webappdir; + root = richieSrc; extraConfig = [ '' Use Stats europe-richie.org @@ -90,7 +89,7 @@ in Require all denied - + DirectoryIndex index.php index.htm index.html Options Indexes FollowSymLinks MultiViews Includes AllowOverride None