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