Migrate to flake
This commit is contained in:
parent
7e24481850
commit
6cdbba8c60
42 changed files with 842 additions and 770 deletions
92
home/fhauser/applications/git.nix
Normal file
92
home/fhauser/applications/git.nix
Normal file
|
@ -0,0 +1,92 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
aliases = {
|
||||
s = "status --short --branch";
|
||||
a = "add --patch";
|
||||
c = "commit --message";
|
||||
l =
|
||||
"log --color --graph --pretty=format:'%Cred%h%Creset - %C(bold)%s%Creset%C(yellow)%d%Creset %C(green)%an%Creset %C(cyan)%cr%Creset (S: %G?)' --abbrev-commit";
|
||||
d = "diff";
|
||||
|
||||
fup = "commit --fixup";
|
||||
fuprebase = "rebase --interactive --autosquash";
|
||||
|
||||
ignore = "update-index --skip-worktree";
|
||||
unignore = "update-index --no-skip-worktree";
|
||||
ignored = ''!git ls-files -v | grep "^S"'';
|
||||
};
|
||||
#delta = {
|
||||
# enable = true;
|
||||
# options = {
|
||||
# side-by-side = "true";
|
||||
|
||||
# line-numbers = "true";
|
||||
# line-numbers-minus-style = "#444444";
|
||||
# line-numbers-zero-style = "#444444";
|
||||
# line-numbers-plus-style = "#444444";
|
||||
# line-numbers-left-format = "{nm:>4}┊";
|
||||
# line-numbers-right-format = "{np:>4}│";
|
||||
# line-numbers-left-style = "blue";
|
||||
# line-numbers-right-style = "blue";
|
||||
# };
|
||||
#};
|
||||
extraConfig = {
|
||||
core = {
|
||||
packedGitWindowSize = "16m";
|
||||
packedGitLimit = "64m";
|
||||
};
|
||||
pack = {
|
||||
windowMemory = "64m";
|
||||
packSizeLimit = "64m";
|
||||
thread = "1";
|
||||
deltaCacheSize = "1m";
|
||||
};
|
||||
color = {
|
||||
branch = "auto";
|
||||
diff = "auto";
|
||||
status = "auto";
|
||||
};
|
||||
submodule.recurse = true;
|
||||
push.default = "current";
|
||||
pull.rebase = "true";
|
||||
branch.autosetuprebase = "always";
|
||||
log.follow = true;
|
||||
rerere.enabled = true;
|
||||
};
|
||||
includes = let
|
||||
mkDefaultConfig = (dir: {
|
||||
condition = "gitdir:${dir}";
|
||||
contents = {
|
||||
user = {
|
||||
signingkey = "0x8A52A140BEBF7D2C";
|
||||
email = "fabian@fh2.ch";
|
||||
name = "Fabian Hauser";
|
||||
};
|
||||
};
|
||||
});
|
||||
workConfig = {
|
||||
contents = {
|
||||
commit.gpgsign = true;
|
||||
tag.gpgsign = true;
|
||||
user = {
|
||||
signingkey = "0xE0CDD70E5D286D64";
|
||||
email = "fabian.hauser@threema.ch";
|
||||
};
|
||||
url."git@work.github.com".insteadOf = "git@github.com";
|
||||
};
|
||||
};
|
||||
in [
|
||||
(mkDefaultConfig "~/private/")
|
||||
(mkDefaultConfig "/etc/nixos/")
|
||||
(mkDefaultConfig "~/.password-store/")
|
||||
(mkDefaultConfig "~/shares/cloud.qo.is/")
|
||||
(mkDefaultConfig "~/shares/drive.switch.ch/")
|
||||
((mkDefaultConfig "~/work/") // workConfig)
|
||||
((mkDefaultConfig "~/shares/cloud.threema.ch/") // workConfig)
|
||||
];
|
||||
ignores = [ "*~" "*.swp" ".direnv/" ];
|
||||
lfs.enable = true;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue