nix-config/modules/scripts/onchange.nix
Oliver Davies a74ee06ec3
Some checks are pending
/ check (push) Waiting to run
Create onchange script
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
2025-09-24 01:35:51 +01:00

23 lines
415 B
Nix

{
flake.modules.homeManager.base =
{ pkgs, ... }:
{
home.packages = [
(pkgs.writeShellApplication {
name = "onchange";
runtimeInputs = with pkgs; [
coreutils
entr
];
text = ''
PATTERN="$1"
shift 1
find . -path "$PATTERN" -type f | entr -cs "$@"
'';
})
];
};
}