Compare commits

..

No commits in common. "3bc12ecfa3b01b96da97aa12f2e36e415d0a5641" and "079ece082a4870ff0bfd81b014daf0ad0ab5e11a" have entirely different histories.

3 changed files with 0 additions and 64 deletions

View file

@ -71,21 +71,6 @@
layout = "us"; layout = "us";
xkbVariant = ""; xkbVariant = "";
}; };
# Keyboard mapping on internal keyboard
services.keyd = {
enable = true;
keyboards = {
"internal" = {
ids = [ "0b05:1866" ];
settings = {
main = {
capslock = "overload(control, esc)";
leftcontrol = "capslock";
};
};
};
};
};
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;

View file

@ -3,6 +3,5 @@
imports = [ imports = [
./restic.nix ./restic.nix
./vaultwarden.nix ./vaultwarden.nix
./prometheus.nix
]; ];
} }

View file

@ -1,48 +0,0 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.custom.prometheus;
in
{
options = {
custom.prometheus = {
enable = mkEnableOption "Prometheus instance";
exporters = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable Prometheus exporter on every supported services";
};
};
};
};
config = {
services.prometheus = mkIf cfg.enable {
enable = true;
port = 9091;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
port = 9100;
};
};
scrapeConfigs = [
{ job_name = "prometheus";
static_configs = [
{ targets = [ "localhost:${toString config.services.prometheus.port}" ]; }
];
}
{ job_name = "node";
static_configs = [
{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }
];
}
];
};
};
}