mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-22 07:21:31 +01:00
smartctl_exporter 0.14.0 derives Describe() from the devices it can read at startup. A device that only becomes readable later (an NVMe whose ACL arrives late, or an HDD waking from standby) then makes Collect() emit metrics with unregistered descriptors, so /metrics returns HTTP 500 and the whole scrape fails, hiding even the healthy disks. Backport upstream PR #329, which makes Describe() send the full explicit descriptor set. Carry it as an overlay until smartctl_exporter 0.15.0 is released and packaged in nixpkgs. Refs: https://github.com/prometheus-community/smartctl_exporter/pull/329
Overlays
Overlays for both NixOS and Nix-Darwin.
If you don't know much about overlays, it is recommended to learn the function and usage of overlays through Overlays - NixOS & Flakes Book.
Current Structure
overlays/
├── README.md
├── default.nix # Entrypoint for all overlays
├── computer-use-linux.nix # trycua/computer-use-linux package
├── cua-driver.nix # trycua/cua driver (cua-driver) package
├── smartctl-exporter/ # smartctl_exporter backport (upstream PR #329)
│ ├── default.nix
│ └── 329-explicit-descriptors.patch
└── fcitx5/ # Chinese input method configuration
├── README.md
├── default.nix # fcitx5 overlay definition
└── rime-data-flypy/ # Custom rime data for 小鹤音形输入法
└── share/
└── rime-data/
├── build/
├── default.custom.yaml
├── default.yaml
├── flypy.schema.yaml
├── flypy_full全码字.txt
├── flypy_sys.txt
├── flypy_top.txt
├── flypy_user.txt
├── lua/
│ └── calculator_translator.lua
├── rime.lua
├── squirrel.custom.yaml
└── squirrel.yaml
Components
1. default.nix
The entrypoint of overlays, it execute and import all overlay files in the current directory with the given args.
2. fcitx5
fcitx5's overlay, add my customized Chinese input method - 小鹤音形输入法
This overlay provides:
- Custom rime data for 小鹤音形输入法 (Flypy input method)
- Cross-platform support for both Linux (fcitx5-rime) and macOS (squirrel)
- Pre-configured input method settings
3. Package overlays
computer-use-linux.nix: packagespkgs/computer-use-linux.cua-driver.nix: packagespkgs/cua-driver(used by the computer-use VMs).smartctl-exporter/: patchesprometheus-smartctl-exporterwith upstream PR #329 until smartctl_exporter 0.15.0 is released; seeoverlays/smartctl-exporter/default.nix.