Files

17 lines
438 B
Nix
Raw Permalink Normal View History

2026-08-20 22:03:24 +02:00
{
flake.modules.homeManager.scripts = {
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.home.cli.scripts;
scriptFiles = filesystem.listFilesRecursive ./_scripts;
scripts = map (file: (import file {inherit pkgs config;})) scriptFiles;
in {
options.home.cli.scripts.enable = mkEnableOption "Add custom scripts to PATH";
config.home.packages = mkIf cfg.enable scripts;
};
}