All checks were successful
/ check (push) Successful in 1m37s
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
35 lines
574 B
Nix
35 lines
574 B
Nix
{ withSystem, ... }:
|
|
|
|
let
|
|
name = "onchange";
|
|
in
|
|
{
|
|
perSystem =
|
|
{ pkgs, ... }:
|
|
with pkgs;
|
|
{
|
|
packages.${name} = writeShellApplication {
|
|
inherit name;
|
|
|
|
runtimeInputs = [
|
|
coreutils
|
|
entr
|
|
];
|
|
|
|
text = ''
|
|
PATTERN="$1"
|
|
shift 1
|
|
|
|
find . -path "$PATTERN" -type f | entr -cs "$@"
|
|
'';
|
|
};
|
|
};
|
|
|
|
flake.modules.homeManager.base =
|
|
{ pkgs, ... }:
|
|
{
|
|
home.packages = [
|
|
(withSystem pkgs.system (psArgs: psArgs.config.packages.${name}))
|
|
];
|
|
};
|
|
}
|