2024-03-19 09:23:50 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
2024-02-28 12:31:40 -05:00
|
|
|
inherit (config.sops) secrets;
|
2024-07-24 15:49:31 -04:00
|
|
|
inherit (config.khepri) rwDataDir;
|
2024-02-28 12:31:40 -05:00
|
|
|
|
|
|
|
rwPath = rwDataDir + "/freshrss";
|
|
|
|
in {
|
2024-07-24 20:52:32 -04:00
|
|
|
khepri.compositions."freshrss" = {
|
|
|
|
networks.proxy_net = {external = true;};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
"freshrss" = {
|
|
|
|
image = import ./images/freshrss.nix pkgs;
|
|
|
|
restart = "always";
|
|
|
|
|
|
|
|
ports = ["2800:80"];
|
|
|
|
networks = ["proxy_net"];
|
|
|
|
|
|
|
|
volumes = let
|
|
|
|
rss-bridge = pkgs.stdenv.mkDerivation {
|
|
|
|
name = "rss-bridge-ext";
|
|
|
|
version = "unstable";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "DevonHess";
|
|
|
|
repo = "FreshRSS-Extensions";
|
|
|
|
rev = "299c1febc279be77fa217ff5c2965a620903b974";
|
|
|
|
hash = "sha256-++kgbrGJohKeOeLjcy7YV3QdCf9GyZDtbntlFmmIC5k=";
|
|
|
|
};
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
cp -ar ./xExtension-RssBridge $out/
|
|
|
|
'';
|
2024-03-19 09:23:50 -04:00
|
|
|
};
|
2024-07-24 20:52:32 -04:00
|
|
|
in [
|
|
|
|
"${rwPath}/data:/var/www/FreshRSS/data"
|
|
|
|
"${rss-bridge}/xExtension-RssBridge:/var/www/FreshRSS/extensions/xExtension-RssBridge:ro"
|
|
|
|
];
|
2024-02-28 12:31:40 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
environmentFiles = [secrets.freshrss.path];
|
2024-02-28 12:31:40 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
environment = {
|
|
|
|
TZ = "America/New_York";
|
|
|
|
CRON_MIN = "3,33";
|
|
|
|
};
|
2024-02-28 12:31:40 -05:00
|
|
|
};
|
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
"freshrss-db" = {
|
|
|
|
image = import ./images/postgres.nix pkgs;
|
|
|
|
restart = "always";
|
|
|
|
|
|
|
|
volumes = [
|
|
|
|
"${rwPath}/db:/var/lib/postgresql/data"
|
|
|
|
];
|
2024-02-28 12:31:40 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
networks = ["proxy_net"];
|
2024-02-28 12:31:40 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
environmentFiles = [secrets.freshrss.path];
|
2024-02-28 12:31:40 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
environment = {
|
|
|
|
POSTGRES_DB = "\${DB_BASE:-freshrss}";
|
|
|
|
POSTGRES_USER = "\${DB_USER:-freshrss}";
|
|
|
|
POSTGRES_PASSWORD = "\${DB_PASSWORD:-freshrss}";
|
|
|
|
};
|
2024-02-28 12:31:40 -05:00
|
|
|
};
|
|
|
|
|
2024-08-11 14:53:45 -04:00
|
|
|
"bridge.nelim.org" = {
|
2024-07-24 20:52:32 -04:00
|
|
|
image = import ./images/rss-bridge.nix pkgs;
|
|
|
|
restart = "always";
|
|
|
|
|
|
|
|
volumes = [
|
|
|
|
"${rwPath}/bridge:/config"
|
|
|
|
];
|
|
|
|
ports = ["3006:80"];
|
|
|
|
|
|
|
|
networks = ["proxy_net"];
|
|
|
|
};
|
2024-03-19 09:23:50 -04:00
|
|
|
};
|
2024-02-28 12:31:40 -05:00
|
|
|
};
|
|
|
|
}
|