Files
Nomarchy/pkgs/nomarchy-doctor/default.nix
Bernardo Magri 2a23e82169
Some checks failed
Check / eval (push) Has been cancelled
feat(doctor): nomarchy-doctor — read-only health sheet + VM check (item 10)
The things that actually break user machines, one command (and menu ›
System › Doctor): failed system/user units, disk space (real
filesystems only — fstype allowlist makes it VM/live safe, device
dedupe collapses / and /nix), theme-state.json parses + is
git-tracked, flake dirty/behind as warnings, generation age (profile
symlink mtime — store paths are epoch-1), snapper timeline when
enabled. Read-only by contract; every ✖ prints the one fixing command;
exit 1 on any problem. Ships as pkgs/nomarchy-doctor so the VM check
runs on a minimal node.

Verified: V1 package build (shellcheck-gated) + a real-hardware smoke
that correctly flagged a genuinely failed user unit on the dev box;
V2 green — checks.doctor VM test: induced failed unit flips the sheet
to exit-1 naming the unit and its fix, reset-failed returns healthy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 20:34:11 +01:00

11 lines
442 B
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# One-shot read-only health check (System Doctor / `nomarchy-doctor`).
# A package (not an inline script) so the VM check can exercise it on a
# minimal node without pulling in the whole distro module.
{ writeShellApplication, coreutils, gawk, git, gnugrep, jq, systemd }:
writeShellApplication {
name = "nomarchy-doctor";
runtimeInputs = [ coreutils gawk git gnugrep jq systemd ];
text = builtins.readFile ./nomarchy-doctor.sh;
}