mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 04:50:21 +00:00
Merge staging-next-24.05 into staging-24.05
This commit is contained in:
@@ -27,6 +27,7 @@ let
|
||||
"bird"
|
||||
"bitcoin"
|
||||
"blackbox"
|
||||
"borgmatic"
|
||||
"buildkite-agent"
|
||||
"collectd"
|
||||
"dmarc"
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.prometheus.exporters.borgmatic;
|
||||
in
|
||||
{
|
||||
port = 9996;
|
||||
extraOpts.configFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
default = "/etc/borgmatic/config.yaml";
|
||||
description = ''
|
||||
The path to the borgmatic config file
|
||||
'';
|
||||
};
|
||||
|
||||
serviceOpts = {
|
||||
serviceConfig = {
|
||||
DynamicUser = false;
|
||||
ProtectSystem = false;
|
||||
ProtectHome = lib.mkForce false;
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-borgmatic-exporter}/bin/borgmatic-exporter run \
|
||||
--port ${toString cfg.port} \
|
||||
--config ${toString cfg.configFile} \
|
||||
${lib.concatMapStringsSep " " (f: lib.escapeShellArg f) cfg.extraFlags}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -177,6 +177,26 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
borgmatic = {
|
||||
exporterConfig = {
|
||||
enable = true;
|
||||
user = "root";
|
||||
};
|
||||
metricProvider = {
|
||||
services.borgmatic.enable = true;
|
||||
services.borgmatic.settings.source_directories = [ "/home" ];
|
||||
services.borgmatic.settings.repositories = [ { label = "local"; path = "/var/backup"; } ];
|
||||
services.borgmatic.settings.keep_daily = 10;
|
||||
};
|
||||
exporterTest = ''
|
||||
succeed("borgmatic rcreate -e none")
|
||||
succeed("borgmatic")
|
||||
wait_for_unit("prometheus-borgmatic-exporter.service")
|
||||
wait_for_open_port(9996)
|
||||
succeed("curl -sSf localhost:9996/metrics | grep 'borg_total_backups{repository=\"/var/backup\"} 1'")
|
||||
'';
|
||||
};
|
||||
|
||||
collectd = {
|
||||
exporterConfig = {
|
||||
enable = true;
|
||||
|
||||
47
pkgs/by-name/pr/prometheus-borgmatic-exporter/package.nix
Normal file
47
pkgs/by-name/pr/prometheus-borgmatic-exporter/package.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
python3Packages,
|
||||
borgmatic,
|
||||
}:
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "prometheus-borgmatic-exporter";
|
||||
version = "0.2.5";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "maxim-mityutko";
|
||||
repo = "borgmatic-exporter";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-SgP1utu4Eqs9214pYOT9wP0Ms7AUQH1A3czQF8+qBRo=";
|
||||
};
|
||||
|
||||
nativeCheckInputs = with python3Packages; [
|
||||
pytestCheckHook
|
||||
pytest-mock
|
||||
];
|
||||
|
||||
buildInputs = [python3Packages.poetry-core];
|
||||
|
||||
propagatedBuildInputs =
|
||||
[ borgmatic ]
|
||||
++ (with python3Packages; [
|
||||
flask
|
||||
arrow
|
||||
click
|
||||
loguru
|
||||
pretty-errors
|
||||
prometheus-client
|
||||
timy
|
||||
waitress
|
||||
]);
|
||||
|
||||
meta = with lib; {
|
||||
description = "Prometheus exporter for Borgmatic";
|
||||
homepage = "https://github.com/maxim-mityutko/borgmatic-exporter";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ flandweber ];
|
||||
mainProgram = "borgmatic-exporter";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
@@ -12,61 +12,61 @@
|
||||
"5.10": {
|
||||
"patch": {
|
||||
"extra": "-hardened1",
|
||||
"name": "linux-hardened-v5.10.228-hardened1.patch",
|
||||
"sha256": "1fzpiv9gn2krbx2v61j1dzzsdm0qlgps4rjdkzmi8a8fv9g1iq0p",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v5.10.228-hardened1/linux-hardened-v5.10.228-hardened1.patch"
|
||||
"name": "linux-hardened-v5.10.229-hardened1.patch",
|
||||
"sha256": "0bagy0x1kwm05x9mlgisjrlybk9yl91maxw6fai2si5m4xb3xv7n",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v5.10.229-hardened1/linux-hardened-v5.10.229-hardened1.patch"
|
||||
},
|
||||
"sha256": "0wkvn49sdy9ykyz6cqdqd9yplqfhc6b255w6wc17ky182mzqvk3n",
|
||||
"version": "5.10.228"
|
||||
"sha256": "1q6di05rk4bsy91r03zw6vz14zzcpvv25dv7gw0yz1gzpgkbb9h8",
|
||||
"version": "5.10.229"
|
||||
},
|
||||
"5.15": {
|
||||
"patch": {
|
||||
"extra": "-hardened1",
|
||||
"name": "linux-hardened-v5.15.170-hardened1.patch",
|
||||
"sha256": "16b3dzfgx737hsr16n9j3v4lr1qrl5vgsjmmcri0szbcd5sm0620",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v5.15.170-hardened1/linux-hardened-v5.15.170-hardened1.patch"
|
||||
"name": "linux-hardened-v5.15.171-hardened1.patch",
|
||||
"sha256": "08fbvra05rj0xcj9a8hd6mhv4lis2mhp57v7x4mw7rxxz2vim4bz",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v5.15.171-hardened1/linux-hardened-v5.15.171-hardened1.patch"
|
||||
},
|
||||
"sha256": "1ag7fvixhdcyxv6rqfsvq2wh02g64r4rx8izvfb33nfnld2nangx",
|
||||
"version": "5.15.170"
|
||||
"sha256": "0fra5zwcixgl6fg9hgdzlfcqng6pg09h2j7xqhi4qg0jv1jf0lr9",
|
||||
"version": "5.15.171"
|
||||
},
|
||||
"5.4": {
|
||||
"patch": {
|
||||
"extra": "-hardened1",
|
||||
"name": "linux-hardened-v5.4.284-hardened1.patch",
|
||||
"sha256": "1skqaq90bigrxg0w075nssqbdq868ii62r8asx0m6wcvd5cl50af",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v5.4.284-hardened1/linux-hardened-v5.4.284-hardened1.patch"
|
||||
"name": "linux-hardened-v5.4.285-hardened1.patch",
|
||||
"sha256": "1zm846mzvz1x88iskfw8513jkhlphxkd4v2qs86maxlgiz5zcxqp",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v5.4.285-hardened1/linux-hardened-v5.4.285-hardened1.patch"
|
||||
},
|
||||
"sha256": "0axkwfhvq3w2072xjqww476qa3rjglxyqmf72mlp9b5ymswil8kp",
|
||||
"version": "5.4.284"
|
||||
"sha256": "1722sc365ajxmqyr4r49yp73mzdckay3rx5c2gx29xzny9zc6cmy",
|
||||
"version": "5.4.285"
|
||||
},
|
||||
"6.1": {
|
||||
"patch": {
|
||||
"extra": "-hardened1",
|
||||
"name": "linux-hardened-v6.1.115-hardened1.patch",
|
||||
"sha256": "1vly83nqpridysywj8aby6pmzjgz7jlk6ni957s9v05gfkvf906l",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.1.115-hardened1/linux-hardened-v6.1.115-hardened1.patch"
|
||||
"name": "linux-hardened-v6.1.116-hardened1.patch",
|
||||
"sha256": "0q597vszhgj6bgq56j11nq01mjjxl0ws8kqcr839fzkcgn1h6xv9",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.1.116-hardened1/linux-hardened-v6.1.116-hardened1.patch"
|
||||
},
|
||||
"sha256": "0vxs6zj4p0ihcp11h3svqy3wa1yph0f1vzc8dlvqh60zgs1bmn0g",
|
||||
"version": "6.1.115"
|
||||
"sha256": "109vhc1hcfx6sacw4553xmwbj1gqx3zqjq5zg11z7a72dqrnisqp",
|
||||
"version": "6.1.116"
|
||||
},
|
||||
"6.11": {
|
||||
"patch": {
|
||||
"extra": "-hardened1",
|
||||
"name": "linux-hardened-v6.11.6-hardened1.patch",
|
||||
"sha256": "0g5drxsknvhcd80s1mwmbbc9d3v3qpj4c7rha95ygzwxidvagr9f",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.11.6-hardened1/linux-hardened-v6.11.6-hardened1.patch"
|
||||
"name": "linux-hardened-v6.11.7-hardened1.patch",
|
||||
"sha256": "1rfvlhgl78ixsb75aah9173h8jp37c8i0hs7b4484vljmqv0khcy",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.11.7-hardened1/linux-hardened-v6.11.7-hardened1.patch"
|
||||
},
|
||||
"sha256": "1kiky6viwrgm47slpv234lfq1wrwj29p5rx168gix3q0jw0zcm69",
|
||||
"version": "6.11.6"
|
||||
"sha256": "1cpbycx79nl517rz573mja52bgzm249mhqzp424r5mqp91jfrx8b",
|
||||
"version": "6.11.7"
|
||||
},
|
||||
"6.6": {
|
||||
"patch": {
|
||||
"extra": "-hardened1",
|
||||
"name": "linux-hardened-v6.6.59-hardened1.patch",
|
||||
"sha256": "1vdyryd0m9rr0z2pznq6jyxbdhy4w4x85c37gfl4sbbcs9549gnw",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.6.59-hardened1/linux-hardened-v6.6.59-hardened1.patch"
|
||||
"name": "linux-hardened-v6.6.60-hardened1.patch",
|
||||
"sha256": "090bs6nvc9by5higmxfwmzlqjrhbhqs21gsmpxvm18p9l3s08dq3",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.6.60-hardened1/linux-hardened-v6.6.60-hardened1.patch"
|
||||
},
|
||||
"sha256": "0vd76ccd4li4wsg04gc4nai9f4y1nknz967qby0i53y0v046hq93",
|
||||
"version": "6.6.59"
|
||||
"sha256": "1vsjb7ifmf6ic6zv16fbrxjvffqc1mkndza76hjr9aw2a0ny7yaj",
|
||||
"version": "6.6.60"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,13 +13,13 @@ let
|
||||
# kernel config in the xanmod version commit
|
||||
variants = {
|
||||
lts = {
|
||||
version = "6.6.59";
|
||||
hash = "sha256-VImhbdU+WAP0QRnYjHBNKYw5NlMDCBy8HJyP2NQBNHY=";
|
||||
version = "6.6.60";
|
||||
hash = "sha256-hbuMuLoXVaFb/HnkVlJm8BSwStxsWmz5e4y65kXBJto=";
|
||||
};
|
||||
|
||||
main = {
|
||||
version = "6.11.6";
|
||||
hash = "sha256-t0kuKK2f8D1vxoX5dJnodTu3aBmzCc8F7tHwVAUHP1M=";
|
||||
version = "6.11.7";
|
||||
hash = "sha256-+gj6sR20v4+NHR4cqsVK5fVpqXs9zxcBh0kJUH5qpNE=";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "panoply";
|
||||
version = "5.5.4";
|
||||
version = "5.5.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.giss.nasa.gov/tools/panoply/download/PanoplyJ-${version}.tgz";
|
||||
hash = "sha256-rC2vQcaanK2nNSDtiXNhyBiV0SN3QqtwU8WNBc7D/Nw=";
|
||||
hash = "sha256-rvJ3pyAbHI2/g3v+eKQF0Q9mx6+lLozaB8CLAAzOXRs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
Reference in New Issue
Block a user