Skip to content

Commit

Permalink
fix(git): update global gitignores
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Jan 4, 2024
1 parent 4d0d465 commit 037e1f0
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 26 deletions.
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
./modules/tmux
./modules/neovim
./modules/gpg.nix
./modules/git.nix
./modules/git
./modules/gh
./modules/top.nix
./modules/shell.nix
Expand Down Expand Up @@ -138,7 +138,7 @@
./modules/tmux
./modules/neovim
./modules/gpg.nix
./modules/git.nix
./modules/git
./modules/gh
./modules/top.nix
./modules/shell.nix
Expand Down
26 changes: 2 additions & 24 deletions modules/git.nix → modules/git/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }: {
{ pkgs, lib, ... }: {
home.packages = with pkgs; [
git-lfs
];
Expand Down Expand Up @@ -57,28 +57,6 @@
pull = { ff = "only"; };
init = { defaultBranch = "main"; };
};
ignores = [
".DS_Store"
".svn"
"*~"
"*.swp"
"*.orig"
"*.rbc"
".idea"
"*.iml"
".classpath"
".project"
".settings"
".ruby-version"
".vscode/"
"dump.rdb"
"main.tfvars"
"coverage.out"
"coverage.txt"
".luarc.json"
"*.log"
".env"
];

ignores = lib.splitString "\n" (builtins.readFile ./gitignore_global);
};
}
102 changes: 102 additions & 0 deletions modules/git/gitignore_global
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
####
# Vim.gitignore
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~

####
# Go.gitignore
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
vendor/

# Go workspace file
go.work

####
# macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

####
# Linux.gitignore
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

####
# Nix.gitignore
# Ignore build outputs from performing a nix-build or `nix build` command
result
result-*

####
# Redis.gitignore
# Ignore redis binary dump (dump.rdb) files

*.rdb

0 comments on commit 037e1f0

Please sign in to comment.