2024-05-10 02:37:26 +03:00
|
|
|
{ pkgs, packagesPath, ... }:
|
2024-04-16 02:51:46 +03:00
|
|
|
|
2023-04-01 00:33:43 +03:00
|
|
|
{
|
2024-04-16 02:51:46 +03:00
|
|
|
home.packages = [
|
|
|
|
pkgs.git-crypt
|
2024-05-10 02:37:26 +03:00
|
|
|
(pkgs.callPackage (packagesPath + /git-crypt-rm-gpg-user) { })
|
2024-04-16 02:51:46 +03:00
|
|
|
];
|
2023-04-01 00:33:43 +03:00
|
|
|
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
2023-04-10 10:44:47 +03:00
|
|
|
lfs.enable = true;
|
2023-04-01 00:33:43 +03:00
|
|
|
userEmail = "dmitriy@pleshevski.ru";
|
|
|
|
userName = "Dmitriy Pleshevskiy";
|
|
|
|
signing = {
|
2024-04-18 18:19:50 +03:00
|
|
|
key = "17041163DA10A9A2";
|
2023-04-01 00:33:43 +03:00
|
|
|
signByDefault = true;
|
|
|
|
};
|
2023-04-03 23:51:18 +03:00
|
|
|
includes =
|
2023-06-14 15:55:59 +03:00
|
|
|
import ./myrepo.secret.nix
|
2023-04-01 00:33:43 +03:00
|
|
|
# My main account was suspended due to sanctions
|
2023-06-14 15:55:59 +03:00
|
|
|
++ import ./github.secret.nix
|
2023-04-01 00:33:43 +03:00
|
|
|
# Work account
|
2023-04-03 23:51:18 +03:00
|
|
|
++ import ./gitlab.secret.nix;
|
2023-04-01 00:33:43 +03:00
|
|
|
ignores = [ ".nlsp-settings" ];
|
|
|
|
extraConfig = {
|
|
|
|
init.defaultBranch = "main";
|
|
|
|
pull.rebase = true;
|
|
|
|
};
|
|
|
|
aliases = {
|
|
|
|
co = "switch";
|
|
|
|
cob = "switch -c";
|
|
|
|
cobf = "switch -C";
|
2023-07-06 16:21:12 +03:00
|
|
|
|
2023-04-01 00:33:43 +03:00
|
|
|
st = "status -sb";
|
2023-07-06 16:21:12 +03:00
|
|
|
|
2023-04-01 00:33:43 +03:00
|
|
|
d = "diff";
|
|
|
|
dc = "diff --cached";
|
2023-07-06 16:21:12 +03:00
|
|
|
|
2023-04-01 00:33:43 +03:00
|
|
|
aa = "add .";
|
|
|
|
ai = "add -i";
|
2023-07-06 16:21:12 +03:00
|
|
|
|
2023-04-01 00:33:43 +03:00
|
|
|
c = "commit";
|
|
|
|
cm = "commit -m";
|
|
|
|
ca = "commit --amend";
|
|
|
|
cam = "commit --amend -m";
|
|
|
|
can = "commit --amend --no-edit";
|
2023-07-06 16:21:12 +03:00
|
|
|
|
2023-04-01 00:33:43 +03:00
|
|
|
p = "push";
|
|
|
|
po = "push origin";
|
|
|
|
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";
|
2023-07-06 16:21:12 +03:00
|
|
|
|
2023-07-06 16:20:31 +03:00
|
|
|
f = "fetch";
|
|
|
|
fo = "fetch origin";
|
2024-05-21 21:13:24 +03:00
|
|
|
foa = "fetch --all";
|
|
|
|
foap = "fetch --all --prune";
|
2023-07-06 16:21:12 +03:00
|
|
|
|
2023-04-01 00:33:43 +03:00
|
|
|
rb = "rebase";
|
|
|
|
rbi = "rebase -i";
|
|
|
|
rbc = "rebase --continue";
|
2023-07-06 16:21:12 +03:00
|
|
|
rba = "rebase --abort";
|
|
|
|
|
|
|
|
ch = "cherry-pick";
|
|
|
|
chi = "cherry-pick -i";
|
|
|
|
chc = "cherry-pick --continue";
|
|
|
|
cha = "cherry-pick --abort";
|
|
|
|
|
2024-05-21 20:52:04 +03:00
|
|
|
re = "restore";
|
|
|
|
res = "restore --staged";
|
2024-05-29 02:23:12 +03:00
|
|
|
resw = "restore --staged --worktree";
|
2024-05-21 20:52:04 +03:00
|
|
|
|
2024-05-23 15:45:52 +03:00
|
|
|
rls = "ls-remote --heads";
|
|
|
|
rlso = "ls-remote --heads origin";
|
|
|
|
rlsu = "ls-remote --heads upstream";
|
|
|
|
|
2023-04-01 00:33:43 +03:00
|
|
|
lo = "log --pretty=oneline";
|
2023-07-06 16:21:12 +03:00
|
|
|
|
2023-04-01 00:33:43 +03:00
|
|
|
sma = "submodule add";
|
|
|
|
smui = "submodule update --init";
|
2023-07-06 16:21:12 +03:00
|
|
|
|
2023-04-02 10:14:21 +03:00
|
|
|
s = "stash";
|
2023-04-01 00:33:43 +03:00
|
|
|
sm = "stash push -m";
|
|
|
|
sl = "stash list";
|
|
|
|
sa = "stash apply";
|
|
|
|
sai = "stash apply --index";
|
|
|
|
sp = "stash pop";
|
|
|
|
spi = "stash pop --index";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|