system/users/jan/git/default.nix

102 lines
2.3 KiB
Nix
Raw Normal View History

{ pkgs, packagesPath, ... }:
2024-04-16 02:51:46 +03:00
{
2024-04-16 02:51:46 +03:00
home.packages = [
pkgs.git-crypt
(pkgs.callPackage (packagesPath + /git-crypt-rm-gpg-user) { })
2024-04-16 02:51:46 +03:00
];
programs.git = {
enable = true;
2023-04-10 10:44:47 +03:00
lfs.enable = true;
userEmail = "dmitriy@pleshevski.ru";
userName = "Dmitriy Pleshevskiy";
signing = {
2024-04-18 18:19:50 +03:00
key = "17041163DA10A9A2";
signByDefault = true;
};
includes =
import ./myrepo.secret.nix
# My main account was suspended due to sanctions
++ import ./github.secret.nix
# Work account
++ import ./gitlab.secret.nix;
ignores = [ ".nlsp-settings" ];
extraConfig = {
init.defaultBranch = "main";
pull.rebase = true;
advice.skippedCherryPicks = false;
};
aliases = {
co = "switch";
cob = "switch -c";
cobf = "switch -C";
st = "status -sb";
d = "diff";
dc = "diff --cached";
aa = "add .";
ai = "add -i";
c = "commit";
cm = "commit -m";
ca = "commit --amend";
cam = "commit --amend -m";
can = "commit --amend --no-edit";
p = "push";
2024-11-06 16:52:38 +03:00
pt = "push --tags";
po = "push origin";
2024-11-06 16:52:38 +03:00
pot = "push origin --tags";
pf = "push --force-with-lease";
pfo = "push --force-with-lease origin";
pl = "pull";
plo = "pull origin";
2024-05-21 21:13:24 +03:00
plup = "pull upstream";
f = "fetch";
fo = "fetch origin";
2024-05-21 21:13:24 +03:00
foa = "fetch --all";
foap = "fetch --all --prune";
rb = "rebase";
rbi = "rebase -i";
rbc = "rebase --continue";
rba = "rebase --abort";
ch = "cherry-pick";
chi = "cherry-pick -i";
chc = "cherry-pick --continue";
cha = "cherry-pick --abort";
re = "restore";
res = "restore --staged";
resw = "restore --staged --worktree";
rls = "ls-remote --heads";
rlso = "ls-remote --heads origin";
rlsu = "ls-remote --heads upstream";
lo = "log --pretty=oneline";
2024-11-06 16:52:38 +03:00
los = "log --pretty='format:%s'";
loH = "log --pretty='format:%H'";
sma = "submodule add";
smui = "submodule update --init";
s = "stash";
sm = "stash push -m";
sl = "stash list";
sa = "stash apply";
sai = "stash apply --index";
sp = "stash pop";
spi = "stash pop --index";
2024-11-06 16:52:38 +03:00
t = "tag";
tf = "tag --force";
};
};
}