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
@ -150,7 +151,8 @@
htop.enable = true; htop.enable = true;
}; };
environment.systemPackages = environment = {
systemPackages =
with pkgs; with pkgs;
[ [
powershell powershell
@ -168,7 +170,9 @@
terminal-parrot terminal-parrot
rar rar
goldwarden 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";
};
};
};
}