home: git: add default ignores
This commit is contained in:
parent
d5ec493b92
commit
bf2671a162
26
home/git/default.ignore
Normal file
26
home/git/default.ignore
Normal file
|
@ -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
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue