update retention

This commit is contained in:
Jeffrey C. Ollie 2024-08-24 16:10:21 -05:00
parent fb4095501f
commit 2979ae4c9e
Signed by: jeff
GPG key ID: 6F86035A6D97044E

View file

@ -5,9 +5,6 @@
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-23.11";
};
# nixpkgs-pgvectors = {
# url = "github:diogotcorreia/nixpkgs/pgvecto.rs";
# };
flake-utils = {
url = "github:numtide/flake-utils";
};
@ -18,7 +15,7 @@
# nixpkgs-pgvectors,
flake-utils,
...
} @ inputs:
}:
(
flake-utils.lib.eachDefaultSystem
(
@ -51,44 +48,6 @@
license = licenses.mit;
};
};
# pgvecto-rs = let
# pname = "pgvecto.rs";
# version = "0.1.11";
# hashes = {
# "15" = "sha256-IVx/LgRnGyvBRYvrrJatd7yboWEoSYSJogLaH5N/wPA=";
# };
# major = pkgs.lib.versions.major pkgs.postgresql_15.version;
# in
# pkgs.stdenv.mkDerivation {
# inherit pname version;
# buildInputs = [pkgs.dpkg];
# src = pkgs.fetchurl {
# url = "https://github.com/tensorchord/pgvecto.rs/releases/download/v${version}/vectors-pg${major}-v${version}-x86_64-unknown-linux-gnu.deb";
# hash = hashes."${major}";
# };
# dontUnpack = true;
# dontBuild = true;
# dontStrip = true;
# installPhase = ''
# mkdir -p $out
# dpkg -x $src $out
# install -D -t $out/lib $out/usr/lib/postgresql/${major}/lib/*.so
# install -D -t $out/share/postgresql/extension $out/usr/share/postgresql/${major}/extension/*.sql
# install -D -t $out/share/postgresql/extension $out/usr/share/postgresql/${major}/extension/*.control
# rm -rf $out/usr
# '';
# meta = {
# description = "Scalable Vector database plugin for Postgres, written in Rust, specifically designed for LLM";
# homepage = "https://github.com/tensorchord/pgvecto.rs";
# license = pkgs.lib.licenses.asl20;
# platforms = pkgs.postgresql.meta.platforms;
# };
# };
};
}
)
@ -414,30 +373,10 @@
++ (
lib.optionals cfg.plugins.pgvecto-rs.enable [
plugins.pgvecto-rs
# nixpkgs-pgvectors.legacyPackages.${pkgs.system}.postgresqlPackages.pgvecto-rs
# self.packages.${pkgs.system}.pgvecto-rs
]
)
);
# rcloneConfig = pkgs.writeTextFile {
# name = "rclone.conf";
# text = {
# "b2" = ''
# [b2]
# type = b2
# account = ${cfg.backup.storage.b2.accountId}
# key = ${cfg.backup.storage.b2.accountKey}
# '';
# "azure" = ''
# [azure]
# type = azureblob
# account = ${cfg.backup.storage.azure.accountName}
# key = ${cfg.backup.storage.azure.accountKey}
# '';
# }.${cfg.backup.storage.type};
# };
rcloneEnvironment =
{
RCLONE_CONFIG = "/dev/null";
@ -501,8 +440,9 @@
PGBACKREST_PG1_PATH = dataDir;
PGBACKREST_PROCESS_MAX = "${builtins.toString cfg.backup.processMax}";
PGBACKREST_REPO1_CIPHER_TYPE = cfg.backup.cipher.type;
PGBACKREST_REPO1_RETENTION_FULL = "14";
PGBACKREST_REPO1_RETENTION_FULL_TYPE = "time";
PGBACKREST_REPO1_RETENTION_DIFF = "2";
PGBACKREST_REPO1_RETENTION_FULL = "4";
PGBACKREST_REPO1_RETENTION_FULL_TYPE = "count";
PGBACKREST_STANZA = "${config.networking.hostName}.${config.networking.domain}";
}
// (