home: git: clean up ignore file handling
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bruno BELANYI 2021-03-15 20:52:12 +00:00
parent 4363c1312e
commit 3e9ccdbca7

View file

@ -123,8 +123,10 @@ in
ignores =
let
readLines = file: lib.splitString "\n" (builtins.readFile file);
removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line));
inherit (builtins) readFile;
inherit (lib) filter hasPrefix splitString;
readLines = file: splitString "\n" (readFile file);
removeComments = filter (line: line != "" && !(hasPrefix "#" line));
getPaths = file: removeComments (readLines file);
in
getPaths ./default.ignore;