Migrate git setup to home-manager
This was previously done through custom dotfiles.
This commit is contained in:
parent
1d843a2b68
commit
6a67e5df5d
7
home.nix
7
home.nix
|
@ -36,6 +36,7 @@
|
|||
pkgs.litecli
|
||||
pkgs.mycli
|
||||
pkgs.mkcert
|
||||
pkgs.tig
|
||||
|
||||
# Writing
|
||||
pkgs.languagetool
|
||||
|
@ -44,6 +45,12 @@
|
|||
pkgs.vlc
|
||||
];
|
||||
|
||||
programs = {
|
||||
git = import ./home/programs/git.nix {
|
||||
inherit pkgs;
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".myclirc".source = ./home/files/myclirc;
|
||||
|
||||
services.dunst = import ./home/configurations/dunst.nix;
|
||||
|
|
113
home/programs/git.nix
Normal file
113
home/programs/git.nix
Normal file
|
@ -0,0 +1,113 @@
|
|||
{ pkgs }:
|
||||
|
||||
{
|
||||
enable = true;
|
||||
|
||||
userName = "Daniel Siepmann";
|
||||
userEmail = "coding@daniel-siepmann.de";
|
||||
|
||||
signing = {
|
||||
key = "15560EF4";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
aliases = {
|
||||
c = "checkout";
|
||||
ss = "show -s";
|
||||
|
||||
s = "status -s";
|
||||
dc = "diff --cached";
|
||||
|
||||
sc = "switch -c";
|
||||
st = "switch -t";
|
||||
|
||||
com = "commit";
|
||||
|
||||
ri = "rebase -i";
|
||||
rc = "rebase --continue";
|
||||
|
||||
fap = "fetch --all --prune";
|
||||
rh = "reset --hard";
|
||||
|
||||
lg = "log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative";
|
||||
};
|
||||
|
||||
ignores = [
|
||||
# Some files which might be generated by system or tools
|
||||
"*~"
|
||||
"*.swp"
|
||||
"*.swn"
|
||||
"*.swo"
|
||||
"*.orig"
|
||||
"*.rej"
|
||||
"*.pyc"
|
||||
"*.bak"
|
||||
"*/tags"
|
||||
"/tags"
|
||||
"*.~lock.*#"
|
||||
# As I'm using Makefiles in many projects for my own confidence
|
||||
"Makefile"
|
||||
|
||||
# Some generics which occur in some projects
|
||||
"build/"
|
||||
"logs/"
|
||||
|
||||
# PHP Specific
|
||||
".phpunit.result.cache"
|
||||
"phpcs.xml"
|
||||
|
||||
# TYPO3 documentation specific
|
||||
"Documentation-GENERATED-temp*/"
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
advice = {
|
||||
detachedHead = false;
|
||||
};
|
||||
|
||||
branch = {
|
||||
autosetuprebase = "always";
|
||||
};
|
||||
|
||||
color = {
|
||||
diff = "auto";
|
||||
status = "auto";
|
||||
branch = "auto";
|
||||
interactive = "auto";
|
||||
ui = "auto";
|
||||
};
|
||||
|
||||
pager = {
|
||||
branch = false;
|
||||
show = false;
|
||||
log = toString pkgs.less + "/bin/less";
|
||||
diff = toString pkgs.less + "/bin/less";
|
||||
};
|
||||
|
||||
grep = {
|
||||
lineNumber = true;
|
||||
};
|
||||
|
||||
help = {
|
||||
autocorrect = 1;
|
||||
};
|
||||
|
||||
push = {
|
||||
default = "current";
|
||||
gpgSign = "if-asked";
|
||||
};
|
||||
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
|
||||
diff = {
|
||||
tool = toString pkgs.xxdiff + "/bin/xxdiff";
|
||||
};
|
||||
|
||||
merge = {
|
||||
ff = true;
|
||||
tool = "nvimdiff";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue