summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/home.nix b/home.nix
index f671553..d2af0cc 100644
--- a/home.nix
+++ b/home.nix
@@ -38,6 +38,61 @@
pkgs.youtube-dl
];
+ programs.bash = {
+ enable = true;
+ shellAliases = {
+ a = "fasd -a"; # any
+ s = "fasd -si"; # show / search / select
+ d = "fasd -d"; # directory
+ f = "fasd -f"; # file
+ sd = "fasd -sid"; # interactive directory selection
+ sf = "fasd -sif"; # interactive file selection
+ z = "fasd_cd -d"; # cd, same functionality as j in autojump
+ zz = "fasd_cd -d -i"; # cd with interactive selection
+ g = "grep -in";
+ rm = "rm -i";
+ myip = "ifconfig | grep 'inet ' | grep -v 127.0.0.1 | cut -d\ -f10";
+ ddate = "date +%Y.%m.%d";
+ tdate = "date +%Y.%m.%d..%H.%M";
+ ttime = "date +%H.%M";
+ day = "date +%a";
+ dday = "date +%A";
+ gl = "git pull --prune";
+ glog = ''git log --graph --pretty=format:"%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset" --abbrev-commit --date=relative'';
+ gp = "git push origin HEAD";
+ gd = "git diff";
+ gc = "git commit";
+ gca = "git commit -a";
+ gco = "git checkout";
+ gb = "git branch";
+ gs = "git status -sb";
+ # super handy when working with lots of repos
+ gsdir = ''for d in */; do cd $d && echo "$d" && git status -sb ; echo ; cd .. ; done'';
+ pull = "git pull";
+ ci = "git commit";
+ st = "git status";
+ fetch = "git fetch";
+ push = "git push";
+ # Two aliases for adding files. The first ignores delete files, the second
+ # includes them.
+ add = "git add --ignore-removal";
+ ga = "git add -A";
+ };
+ profileExtra = ''
+OLDPATH=$PATH
+for DIR in \
+ $HOME/bin \
+ $HOME/me/bin \
+ $HOME/.local/bin
+do
+ if [ -d $DIR ]
+ then
+ PATH=$DIR:$PATH
+ fi
+done
+ '';
+ };
+
programs.emacs = {
enable = true;
extraPackages = epkgs: with epkgs; [