WIP: fail2ban: Add metrics
This commit is contained in:
parent
3a818ecc21
commit
c128bc7ab0
10
flake.nix
10
flake.nix
|
@ -78,7 +78,7 @@
|
||||||
# Utility scripts #
|
# Utility scripts #
|
||||||
###################
|
###################
|
||||||
packages.${system} = let
|
packages.${system} = let
|
||||||
inherit (nixpkgs.legacyPackages.${system}) writeShellScript;
|
inherit (nixpkgs.legacyPackages.${system}) writeShellScript writeShellScriptBin;
|
||||||
vm = nixpkgs.lib.nixosSystem {
|
vm = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs.flake-inputs = inputs;
|
specialArgs.flake-inputs = inputs;
|
||||||
|
@ -106,6 +106,14 @@
|
||||||
"${vm.config.system.build.vm}/bin/run-tlaternet-vm"
|
"${vm.config.system.build.vm}/bin/run-tlaternet-vm"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
update-pkgs = let
|
||||||
|
nvfetcher-bin = "${nvfetcher.packages.${system}.default}/bin/nvfetcher";
|
||||||
|
in
|
||||||
|
writeShellScriptBin "update-pkgs" ''
|
||||||
|
cd "$(git rev-parse --show-toplevel)/pkgs"
|
||||||
|
${nvfetcher-bin} -o _sources_pkgs -c nvfetcher.toml
|
||||||
|
'';
|
||||||
|
|
||||||
update-nextcloud-apps = let
|
update-nextcloud-apps = let
|
||||||
nvfetcher-bin = "${nvfetcher.packages.${system}.default}/bin/nvfetcher";
|
nvfetcher-bin = "${nvfetcher.packages.${system}.default}/bin/nvfetcher";
|
||||||
in
|
in
|
||||||
|
|
21
pkgs/_sources_pkgs/generated.json
Normal file
21
pkgs/_sources_pkgs/generated.json
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"prometheus-fail2ban-exporter": {
|
||||||
|
"cargoLocks": null,
|
||||||
|
"date": null,
|
||||||
|
"extract": null,
|
||||||
|
"name": "prometheus-fail2ban-exporter",
|
||||||
|
"passthru": null,
|
||||||
|
"pinned": false,
|
||||||
|
"src": {
|
||||||
|
"deepClone": false,
|
||||||
|
"fetchSubmodules": false,
|
||||||
|
"leaveDotGit": false,
|
||||||
|
"name": null,
|
||||||
|
"rev": "v0.10.0",
|
||||||
|
"sha256": "sha256-8nIW1XaHCBqQCoLkV1ZYE3NTbVZ6c+UOqYD08XQiv+4=",
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter"
|
||||||
|
},
|
||||||
|
"version": "v0.10.0"
|
||||||
|
}
|
||||||
|
}
|
16
pkgs/_sources_pkgs/generated.nix
Normal file
16
pkgs/_sources_pkgs/generated.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# This file was generated by nvfetcher, please do not modify it manually.
|
||||||
|
{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }:
|
||||||
|
{
|
||||||
|
prometheus-fail2ban-exporter = {
|
||||||
|
pname = "prometheus-fail2ban-exporter";
|
||||||
|
version = "v0.10.0";
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter";
|
||||||
|
rev = "v0.10.0";
|
||||||
|
fetchSubmodules = false;
|
||||||
|
deepClone = false;
|
||||||
|
leaveDotGit = false;
|
||||||
|
sha256 = "sha256-8nIW1XaHCBqQCoLkV1ZYE3NTbVZ6c+UOqYD08XQiv+4=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -7,6 +7,7 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
starbound = callPackage ./starbound {};
|
starbound = callPackage ./starbound {};
|
||||||
|
prometheus-fail2ban-exporter = callPackage ./prometheus/fai2ban-exporter.nix {};
|
||||||
}
|
}
|
||||||
// (
|
// (
|
||||||
# Add nextcloud apps
|
# Add nextcloud apps
|
||||||
|
|
3
pkgs/nvfetcher.toml
Normal file
3
pkgs/nvfetcher.toml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[prometheus-fail2ban-exporter]
|
||||||
|
src.manual = "v0.10.0" # No gitlab support in nvfetcher
|
||||||
|
fetch.git = "https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter"
|
7
pkgs/prometheus/fail2ban-exporter.nix
Normal file
7
pkgs/prometheus/fail2ban-exporter.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
buildGoModule,
|
||||||
|
sources,
|
||||||
|
}:
|
||||||
|
buildGoModule {
|
||||||
|
inherit (sources.prometheus-fail2ban-exporter) name src version;
|
||||||
|
}
|
Loading…
Reference in a new issue