From 9201edf9458e591aea3b48c082da0727ffd38a55 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Mon, 19 Jan 2026 14:11:17 -0500 Subject: [PATCH] refactor: pull out template filter into variable --- flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index fff4f4c..ac9ebb7 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,9 @@ rust = "rust_cargo-nightly_crane+fenix"; }; + # Files to filter out of the template + template-ignore = [ "flake.lock" "Cargo.lock" ]; + # Get all subdirectories of the given path # Returns [str] subdirs = dir: @@ -37,7 +40,7 @@ ${concatStringsSep "_" subds} = { description = generateDesc subds; path = filterSource - (p: _: !(elem (baseNameOf p) [ "flake.lock" "Cargo.lock" ])) + (p: _: !(elem (baseNameOf p) template-ignore)) (foldl' (dir: subd: /${dir}/${subd}) ./. subds); }; }) (flakeSubdirs ./.) // mapAttrs (from: to: