modules/nixos: add cgroups and exporter
This commit is contained in:
parent
d51acadb72
commit
b85d4b06a9
3 changed files with 33 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
inputs.self.nixosModules.buildbot
|
||||
inputs.self.nixosModules.builder
|
||||
inputs.self.nixosModules.ci-builder
|
||||
inputs.self.nixosModules.cgroups
|
||||
inputs.self.nixosModules.hercules-ci
|
||||
inputs.self.nixosModules.watch-store
|
||||
./builders.nix
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
inputs.self.nixosModules.disko-zfs
|
||||
inputs.self.nixosModules.builder
|
||||
inputs.self.nixosModules.ci-builder
|
||||
inputs.self.nixosModules.cgroups
|
||||
inputs.self.nixosModules.hercules-ci
|
||||
inputs.self.nixosModules.remote-builder
|
||||
];
|
||||
|
|
31
modules/nixos/cgroups.nix
Normal file
31
modules/nixos/cgroups.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue