Files
nix-stuff/common/checks.nix
2025-06-29 01:08:13 -07:00

30 lines
492 B
Nix

{
lib,
pkgs,
config,
...
}:
let
inherit (lib) types;
in
{
options.vacu.checks = lib.mkOption {
type = types.attrsOf types.package;
default = { };
};
options.vacu.textChecks = lib.mkOption {
type = types.attrsOf types.lines;
default = { };
};
config.vacu.checks = lib.mapAttrs (
name: lines:
pkgs.runCommand "vacu-textChecks-${name}" { } ''
(
set -xev
${lines}
touch "$out"
)
''
) config.vacu.textChecks;
}