Skip to content

Commit

Permalink
modules/nixos: add cgroups and exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Nov 20, 2024
1 parent 5ba8975 commit 58ee5a0
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion modules/nixos/ci-builder.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
{
imports = [ ../shared/ci-builder.nix ];
config,
inputs,
pkgs,
...
}:
{
imports = [
../shared/ci-builder.nix
inputs.cgroup-exporter.nixosModules.default
];

services.prometheus.exporters.cgroup.enable = true;

services.telegraf.extraConfig.inputs.prometheus.urls = [
"http://localhost:${toString config.services.prometheus.exporters.cgroup.port}/metrics"
];

nix = {
package = pkgs.nixVersions.nix_2_25;

settings = {
experimental-features = [
"auto-allocate-uids"
"cgroups"
];

auto-allocate-uids = true;
use-cgroups = true;
};
};
}

0 comments on commit 58ee5a0

Please sign in to comment.