nixos/freshrss: migrate to DATA_PATH

This commit is contained in:
Felix Buehler 2023-10-24 21:19:42 +02:00
parent 67b0da8f51
commit 29d41b7fd2
2 changed files with 3 additions and 11 deletions

View file

@ -220,7 +220,7 @@ in
"catch_workers_output" = true;
};
phpEnv = {
FRESHRSS_DATA_PATH = "${cfg.dataDir}";
DATA_PATH = "${cfg.dataDir}";
};
};
};
@ -267,7 +267,7 @@ in
WorkingDirectory = cfg.package;
};
environment = {
FRESHRSS_DATA_PATH = cfg.dataDir;
DATA_PATH = cfg.dataDir;
};
script =
@ -302,7 +302,7 @@ in
wantedBy = [ "multi-user.target" ];
startAt = "*:0/5";
environment = {
FRESHRSS_DATA_PATH = cfg.dataDir;
DATA_PATH = cfg.dataDir;
};
serviceConfig = defaultServiceConfig //{
ExecStart = "${cfg.package}/app/actualize_script.php";

View file

@ -26,12 +26,6 @@ stdenvNoCC.mkDerivation rec {
# There's nothing to build.
dontBuild = true;
# the data folder is no in this package and thereby declared by an env-var
overrideConfig = pkgs.writeText "constants.local.php" ''
<?php
define('DATA_PATH', getenv('FRESHRSS_DATA_PATH'));
'';
postPatch = ''
patchShebangs cli/*.php app/actualize_script.php
'';
@ -39,8 +33,6 @@ stdenvNoCC.mkDerivation rec {
installPhase = ''
mkdir -p $out
cp -vr * $out/
cp $overrideConfig $out/constants.local.php
'';
meta = with lib; {