diff --git a/home/git/default.ignore b/home/git/default.ignore new file mode 100644 index 0000000..a169a28 --- /dev/null +++ b/home/git/default.ignore @@ -0,0 +1,26 @@ +# C/C++ binary files +*.so +*.o +*.a +*.out + +# Python files +env/ +__pycache__/ +*.py[cod] +.mypy_cache/ +.dmypy.json +dmypy.json + +# Build system files +compile_commands.json + +# Debugger files +.gdb_history + +# LSP cache +.clangd/ + +# Swap and backup files +*~ +~.swp diff --git a/home/git/default.nix b/home/git/default.nix index fa8c70e..679b7f9 100644 --- a/home/git/default.nix +++ b/home/git/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { programs.git = { enable = true; @@ -96,5 +96,13 @@ includes = [ { path = ./epita.config; condition = "gitdir:~/git/EPITA/"; } ]; + + ignores = + let + readLines = file: lib.splitString "\n" (builtins.readFile file); + removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line)); + getPaths = file: removeComments (readLines file); + in + getPaths ./default.ignore; }; }