parent
f0db12bc73
commit
0898473ffd
|
@ -7,10 +7,6 @@
|
||||||
with lib; {
|
with lib; {
|
||||||
config = {
|
config = {
|
||||||
m-0.monitoring = [
|
m-0.monitoring = [
|
||||||
{
|
|
||||||
host = "hera:9974";
|
|
||||||
name = "hera-folder-sizes";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
host = "apollo:9100";
|
host = "apollo:9100";
|
||||||
name = "apollo";
|
name = "apollo";
|
||||||
|
|
|
@ -29,7 +29,6 @@ in {
|
||||||
../../roles/mailman.nix
|
../../roles/mailman.nix
|
||||||
../../roles/firefox-sync.nix
|
../../roles/firefox-sync.nix
|
||||||
../../roles/goatcounter.nix
|
../../roles/goatcounter.nix
|
||||||
../../roles/prometheus-folder-size-exporter.nix
|
|
||||||
./web.nix
|
./web.nix
|
||||||
./mail.nix
|
./mail.nix
|
||||||
./boot.nix
|
./boot.nix
|
||||||
|
|
|
@ -39,7 +39,6 @@ in {
|
||||||
nixos.source = "/disk/persist/maralorn/git/config";
|
nixos.source = "/disk/persist/maralorn/git/config";
|
||||||
machine-id.source = "/disk/persist/machine-id";
|
machine-id.source = "/disk/persist/machine-id";
|
||||||
};
|
};
|
||||||
environment.systemPackages = [pkgs.prometheus-folder-size-exporter];
|
|
||||||
|
|
||||||
systemd.services."activate-home-manager" = {
|
systemd.services."activate-home-manager" = {
|
||||||
path = [pkgs.nix pkgs.dbus];
|
path = [pkgs.nix pkgs.dbus];
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
{pkgs, ...}: let
|
|
||||||
config = [
|
|
||||||
{
|
|
||||||
"path" = "/";
|
|
||||||
explode_depth = 1;
|
|
||||||
"sum_remaining_subfolders" = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
in {
|
|
||||||
systemd.services.prometheus-folder-size-exporter = {
|
|
||||||
after = ["network-online.target"];
|
|
||||||
wants = ["network-online.target"];
|
|
||||||
description = "Prometheus folder size exporter";
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
DynamicUser = true;
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "${pkgs.prometheus-folder-size-exporter}/bin/prometheus-folder-size-exporter -b 60 -i ${builtins.toJSON config} -p 9974";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
final: prev: {
|
|
||||||
prometheus-folder-size-exporter = final.rustPlatform.buildRustPackage rec {
|
|
||||||
pname = "prometheus_folder_size_exporter";
|
|
||||||
version = "0.5.0";
|
|
||||||
src = final.fetchFromGitHub {
|
|
||||||
owner = "MindFlavor";
|
|
||||||
repo = pname;
|
|
||||||
rev = version;
|
|
||||||
sha256 = "sha256-G1oWGiTyftloPxgOuiYFO7hofHdbwPCG4QDXK1t5qWk=";
|
|
||||||
};
|
|
||||||
cargoSha256 = "sha256:0baxb2fqdywfj9jxmhinm7fqyyn6sdfh6s5vnn7mgwawg00b7h7l";
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue