feat: some git shortcuts

This commit is contained in:
Leon Wilzer 2024-12-07 00:56:52 +01:00
parent 0b69b7d6c6
commit 5c3a626a25
Signed by: leon
GPG Key ID: 645EFCD19E59ED05
2 changed files with 43 additions and 33 deletions

View File

@ -341,7 +341,7 @@ in
home.sessionVariables = { home.sessionVariables = {
PAGER = "less -RFX --tabs=4"; PAGER = "less -RFX --tabs=4";
MANPAGER = "nvim +'setl filetype=terminal' +'Man!'"; MANPAGER = "nvim +'setl filetype=terminal' +'Man!'";
QT_QPA_PLATFORMTHEME = "qt5ct"; QT_QPA_PLATFORMTHEME = "qt5ct";
}; };
xdg.mimeApps = { xdg.mimeApps = {
@ -470,13 +470,14 @@ in
bash # Compat bash # Compat
jetbrains.idea-ultimate # IntelliJ Ultimate jetbrains.idea-ultimate # IntelliJ Ultimate
jetbrains.idea-community # IntelliJ Community jetbrains.idea-community # IntelliJ Community
jetbrains.rust-rover # Rust IDE
maven # Java Build tool maven # Java Build tool
jdk # Java development kit jdk # Java development kit
nixfmt-rfc-style # official nix formatter nixfmt-rfc-style # official nix formatter
ripgrep # some nice grep alternative ripgrep # some nice grep alternative
netcat-gnu # networking connection debugging netcat-gnu # networking connection debugging
libsForQt5.qtstyleplugin-kvantum # qt theme libsForQt5.qtstyleplugin-kvantum # qt theme
libsForQt5.qt5ct # qt theme libsForQt5.qt5ct # qt theme
]; ];
programs = { programs = {
@ -487,6 +488,7 @@ in
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
autocd = true; autocd = true;
shellAliases = { shellAliases = {
g = "git";
git-list-untracked = ''git fetch --prune && git branch -r | awk "{print \$1}" | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk "{print \$1}"''; git-list-untracked = ''git fetch --prune && git branch -r | awk "{print \$1}" | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk "{print \$1}"'';
git-remove-untracked = ''git fetch --prune && git branch -r | awk "{print \$1}" | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk "{print \$1}" | xargs git branch -d''; git-remove-untracked = ''git fetch --prune && git branch -r | awk "{print \$1}" | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk "{print \$1}" | xargs git branch -d'';
}; };
@ -510,12 +512,17 @@ in
userName = "Leon Wilzer"; userName = "Leon Wilzer";
aliases = { aliases = {
ci = "commit"; ci = "commit";
ca = "commit --amend";
ri = "rebase -i";
co = "checkout"; co = "checkout";
s = "status"; s = "status";
undo = "reset --soft 'HEAD^'"; undo = "reset --soft 'HEAD^'";
a = "add"; a = "add -A";
p = "push"; p = "push";
cl = "clone"; c = "clone";
cc = ''clone "$(wl-paste)"'';
d = "diff";
dh = "diff HEAD";
}; };
diff-so-fancy = { diff-so-fancy = {
enable = true; enable = true;
@ -545,6 +552,7 @@ in
in in
{ {
enable = true; enable = true;
package = pkgs.opensshWithKerberos;
addKeysToAgent = "yes"; addKeysToAgent = "yes";
matchBlocks = { matchBlocks = {
"libre.moe *.libre.moe" = { "libre.moe *.libre.moe" = {
@ -559,16 +567,18 @@ in
user = "git"; user = "git";
identityFile = "${sshDir}/github"; identityFile = "${sshDir}/github";
}; };
"*.cs.upb.de *.cs.uni-paderborn.de" = { "*.cs.upb.de *.cs.uni-paderborn.de" = {
extraOptions = { extraOptions = {
"GSSAPIAuthentication" = "yes"; GSSAPIAuthentication = "yes";
"GSSAPIDelegateCredentials" = "yes"; GSSAPIDelegateCredentials = "yes";
}; };
user = "lwilzer"; user = "lwilzer";
}; };
"*.cs.upb.de *.cs.uni-paderborn.de,!sshgate.*,!git.*" = lib.hm.dag.entryAfter ["*.cs.upb.de *.cs.uni-paderborn.de"] { "*.cs.upb.de *.cs.uni-paderborn.de,!sshgate.*,!git.*" =
proxyJump = "sshgate.cs.uni-paderborn.de"; lib.hm.dag.entryAfter [ "*.cs.upb.de *.cs.uni-paderborn.de" ]
}; {
proxyJump = "sshgate.cs.uni-paderborn.de";
};
} // config.programs.ssh.customMatchBlocks; } // config.programs.ssh.customMatchBlocks;
}; };
@ -689,23 +699,23 @@ in
}; };
}; };
systemd.user.services = { systemd.user.services = {
hyprpolkitagent = { hyprpolkitagent = {
Unit = { Unit = {
Description = "hyprpolkit agent"; Description = "hyprpolkit agent";
After = "graphical-session.target"; After = "graphical-session.target";
WantedBy = [ "graphical-session.target" ]; WantedBy = [ "graphical-session.target" ];
Wants = [ "graphical-session.target" ]; Wants = [ "graphical-session.target" ];
}; };
Service = { Service = {
Type = "simple"; Type = "simple";
ExecStart = "${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent"; ExecStart = "${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 1; RestartSec = 1;
TimeoutStopSec = 10; TimeoutStopSec = 10;
}; };
}; };
}; };
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage

View File

@ -60,7 +60,7 @@ in
DontCheckDefaultBrowser = true; DontCheckDefaultBrowser = true;
PrimaryPassword = false; PrimaryPassword = false;
OfferToSaveLoginsDefault = false; OfferToSaveLoginsDefault = false;
DisableBuiltinPDFViewer = true; #DisableBuiltinPDFViewer = true;
PasswordManagerEnabled = false; PasswordManagerEnabled = false;
DisableMasterPasswordCreation = true; DisableMasterPasswordCreation = true;
AutofillAddressEnabled = false; AutofillAddressEnabled = false;