mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 05:50:00 +00:00
Diff: https://github.com/mchehab/rasdaemon/compare/v0.8.5...v1.0.0 Changelog: https://github.com/mchehab/rasdaemon/releases/tag/v1.0.0
39 lines
1.0 KiB
Nix
39 lines
1.0 KiB
Nix
{ pkgs, ... }:
|
|
{
|
|
name = "rasdaemon";
|
|
meta = {
|
|
inherit (pkgs.rasdaemon.meta) maintainers;
|
|
};
|
|
|
|
nodes.machine =
|
|
{ pkgs, ... }:
|
|
{
|
|
imports = [ ../modules/profiles/minimal.nix ];
|
|
hardware.rasdaemon = {
|
|
enable = true;
|
|
# should be enabled by default, just making sure
|
|
record = true;
|
|
# nonsense label
|
|
labels = ''
|
|
vendor: none
|
|
product: none
|
|
model: none
|
|
DIMM_0: 0.0.0;
|
|
'';
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
import json
|
|
start_all()
|
|
machine.wait_for_unit("multi-user.target")
|
|
# confirm rasdaemon is running and has a valid database
|
|
# some disk errors detected in qemu for some reason ¯\_(ツ)_/¯
|
|
errors = json.loads(machine.wait_until_succeeds("ras-mc-ctl database --errors --json"))
|
|
assert errors["records"] == []
|
|
# confirm the supplied labels text made it into the system
|
|
machine.succeed("grep -q 'vendor: none' /etc/ras/dimm_labels.d/labels >&2")
|
|
machine.shutdown()
|
|
'';
|
|
}
|