Configure git

This commit is contained in:
Manuel Thalmann 2024-05-08 16:48:52 +02:00
parent ea8f52a668
commit 0a790ae727
2 changed files with 75 additions and 22 deletions

View file

@ -2,6 +2,7 @@
imports = [
./modules/custom-build-vm.nix
./modules/custom-sops-nix.nix
./modules/git.nix
./modules/my-users.nix
./modules/sddm.nix
./modules/unfree.nix
@ -140,9 +141,9 @@
with pkgs.vimPlugins;
{
start = [
vim-wayland-clipboard
zoxide-vim
];
vim-wayland-clipboard
zoxide-vim
];
};
};
@ -150,25 +151,28 @@
htop.enable = true;
};
environment.systemPackages =
with pkgs;
[
powershell
neofetch
tldr
wget
btop
nvtopPackages.full
numbat
lsof
zoxide
fzf
sl
bb
terminal-parrot
rar
goldwarden
];
environment = {
systemPackages =
with pkgs;
[
powershell
neofetch
tldr
wget
btop
nvtopPackages.full
numbat
lsof
zoxide
fzf
sl
bb
terminal-parrot
rar
goldwarden
gitflow
];
};
# Fonts
fonts.packages =

49
lib/modules/git.nix Normal file
View file

@ -0,0 +1,49 @@
{ ... }:
let
defaultBranch = "main";
in {
config = {
programs.git.config = {
init = {
inherit defaultBranch;
};
gitflow = {
branch = {
master = defaultBranch;
develop = "dev";
};
};
alias = {
"ahfange" = "init";
"tuedezue" = "add";
"beschuldig" = "blame";
"zieh" = "pull";
"druck" = "push";
"machnah" = "clone";
"hol" = "fetch";
"zwiigab" = "branch";
"buechiih" = "commit";
"eich" = "rebase";
"erd" = "rebase";
"gahufwiifelde" = "rebase";
"vergliich" = "diff";
"tuezemme" = "merge";
"versorg" = "stash";
"markier" = "tag";
"pflueckoepfel" = "cherry-pick";
"pflueckhimbeeri" = "cherry-pick";
"buechuus" = "checkout";
"quaetsch" = "merge --squash";
"pfudle" = "push --force";
"beschuldigung" = "blame";
"zwiigli" = "branch";
"tagebuech" = "log";
"versteck" = "stash";
"zuestand" = "status";
"markierig" = "tag";
};
};
};
}