nixos-configs/devices/nos/modules/docker/freshrss/compose.nix

83 lines
2 KiB
Nix
Raw Permalink Normal View History

{
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 {
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/
'';
};
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
environmentFiles = [secrets.freshrss.path];
2024-02-28 12:31:40 -05:00
environment = {
TZ = "America/New_York";
CRON_MIN = "3,33";
};
2024-02-28 12:31:40 -05: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
networks = ["proxy_net"];
2024-02-28 12:31:40 -05:00
environmentFiles = [secrets.freshrss.path];
2024-02-28 12:31:40 -05: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
};
"bridge.nelim.org" = {
image = import ./images/rss-bridge.nix pkgs;
restart = "always";
volumes = [
"${rwPath}/bridge:/config"
];
ports = ["3006:80"];
networks = ["proxy_net"];
};
};
2024-02-28 12:31:40 -05:00
};
}