mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-19 07:54:28 +01:00
* feat: upgrade nixpkgs stable to 25.11, update nixos-apple-silicon, ghostty, anyrun, etc * fix: asahi-nixos - revert mesa to 25.2.6 * fix: disable gitui - it's broken on aarch64-darwin currently --------- Signed-off-by: Ryan Yin <xiaoyin_c@qq.com>
37 lines
1.7 KiB
Nix
37 lines
1.7 KiB
Nix
{
|
|
# enable the node exporter on all nixos hosts
|
|
# https://github.com/NixOS/nixpkgs/blob/nixos-25.11/nixos/modules/services/monitoring/prometheus/exporters/node.nix
|
|
services.prometheus.exporters.node = {
|
|
enable = true;
|
|
listenAddress = "0.0.0.0";
|
|
port = 9100;
|
|
# There're already a lot of collectors enabled by default
|
|
# https://github.com/prometheus/node_exporter?tab=readme-ov-file#enabled-by-default
|
|
enabledCollectors = [
|
|
"systemd"
|
|
"logind"
|
|
];
|
|
|
|
# use either enabledCollectors or disabledCollectors
|
|
# disabledCollectors = [];
|
|
|
|
extraFlags = [
|
|
# Exclude pseudo/ephemeral FS:
|
|
# - /proc, /sys: kernel pseudo-FS, always size 0
|
|
# - /dev: tmpfs/devices, not meaningful for disk usage
|
|
# Exclude system/runtime tmp dirs:
|
|
# - /run/credentials/... → systemd service secrets (strict perms)
|
|
# - /run/user/... → per-user tmpfs (0700, IPC sockets, not storage)
|
|
# Exclude container/runtime mounts:
|
|
# - /var/lib/docker/, /var/lib/containers/ and /var/lib/kubelet/ → too much overlay/tmpfs mounts,
|
|
# often EACCES (strict perms, namespaces) → false alerts
|
|
# Exclude user bind mounts:
|
|
# - /home/ryan/.+ → bind-mounted from /persistent (NixOS tmpfs-root setup),
|
|
# monitoring /persistent is sufficient
|
|
# Note: ^(/|/persistent/) prefix ensures both root-level and
|
|
# /persistent-prefixed paths (used in NixOS's tmpfs-as-root setup) are excluded.
|
|
"--collector.filesystem.mount-points-exclude=^(/|/persistent/)(dev|proc|sys|run/credentials/.+|run/user/.+|var/lib/docker/.+|var/lib/containers/.+|var/lib/kubelet/.+|home/ryan/.+)($|/)"
|
|
];
|
|
};
|
|
}
|