diff --git a/applications/terminal/default-applications.nix b/applications/terminal/default-applications.nix index 6049299..ca150ef 100644 --- a/applications/terminal/default-applications.nix +++ b/applications/terminal/default-applications.nix @@ -39,6 +39,37 @@ mkIf true { git = { enable = true; package = pkgs.gitFull; + config = { + # http://www.git-attitude.fr/2014/09/15/30-options-git-qui-gagnent-a-etre-connues/ + color = { + diff = "auto"; + branch = "auto"; + interactive = "auto"; + pager = true; + showbranch = "auto"; + status = "auto"; + }; + alias = { + a = "add -p"; + br = "for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short)\t%(authorname)\t%(refname:short)'"; + ci = "commit"; + co = "checkout"; + ff = "pull --ff-only"; + oops = "commit --amend --no-edit"; + # Show files ignored by git + ignored = "ls-files -o -i --exclude-standard"; + ls = "ls-files"; + st = "status"; + # Logs + lol = "log --graph --decorate --pretty=oneline --abbrev-commit"; + lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all"; + not-pushed = "log --branches --not --remotes"; + }; + push.default = "simple"; + code.editor = "${pkgs.vim_configurable}/bin/vim"; + }; + lfs.enable = true; + }; }; }; } diff --git a/configuration/environment.nix b/configuration/environment.nix index 83765ed..8cc100b 100644 --- a/configuration/environment.nix +++ b/configuration/environment.nix @@ -43,7 +43,6 @@ in vi = "vim"; byobu-adminsys = "/etc/nixos/base/byobu-adminsys"; }; - etc.gitconfig.text = builtins.readFile ./gitconfig; }; programs.bash = { enableCompletion = true; diff --git a/configuration/gitconfig b/configuration/gitconfig deleted file mode 100644 index e3d4d5e..0000000 --- a/configuration/gitconfig +++ /dev/null @@ -1,27 +0,0 @@ -# http://www.git-attitude.fr/2014/09/15/30-options-git-qui-gagnent-a-etre-connues/ -[color] - diff = auto - branch = auto - interactive = auto - pager = true - showbranch = auto - status = auto -[alias] - a = add -p - br = for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short)\t%(authorname)\t%(refname:short)' - ci = commit - co = checkout - ff = pull --ff-only - oops = commit --amend --no-edit - # Show files ignored by git - ignored = ls-files -o -i --exclude-standard - ls = ls-files - st = status - # Logs - lol = log --graph --decorate --pretty=oneline --abbrev-commit - lola = log --graph --decorate --pretty=oneline --abbrev-commit --all - not-pushed = log --branches --not --remotes -[push] - default = simple -[core] - editor = /usr/bin/env vim