Migrate to flake
This commit is contained in:
parent
7e24481850
commit
6cdbba8c60
42 changed files with 842 additions and 770 deletions
59
home/fhauser/applications/shell.nix
Normal file
59
home/fhauser/applications/shell.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{ pkgs, ... }: {
|
||||
programs = {
|
||||
bash = {
|
||||
enable = true;
|
||||
historyIgnore = [ "ls" "cd" "exit" "j" ];
|
||||
shellAliases = {
|
||||
# Sane defaults
|
||||
l = "ls -lah";
|
||||
cp = "cp --reflink=auto";
|
||||
pwgen = "pwgen -c -n -s -N 30";
|
||||
bc = "bc --mathlib";
|
||||
cal = "cal -m";
|
||||
curl = "curl -L";
|
||||
|
||||
# Git helpers
|
||||
git-fetch-pr =
|
||||
"git config --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*'";
|
||||
git-config-fetchall = ''
|
||||
git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"'';
|
||||
|
||||
git-enable-signing =
|
||||
"git config commit.gpgsign true && git config tag.gpgsign true";
|
||||
# Common Typos
|
||||
gits = "git s";
|
||||
};
|
||||
initExtra = ''
|
||||
function o(){
|
||||
xdg-open "$*" >/dev/null 2>&1 &
|
||||
}
|
||||
'';
|
||||
shellOptions = [ "autocd" "checkjobs" "dotglob" "globstar" "histappend" ];
|
||||
sessionVariables = {
|
||||
#TODO: Some of these should be migrated to the according application.
|
||||
GPG_TTY = "$(tty)";
|
||||
PGDATABASE = "postgres";
|
||||
};
|
||||
};
|
||||
|
||||
autojump = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
powerline-go = {
|
||||
enable = true;
|
||||
settings = {
|
||||
hostname-only-if-ssh = true;
|
||||
numeric-exit-codes = true;
|
||||
colorize-hostname = true;
|
||||
cwd-max-depth = 4;
|
||||
modules = "ssh,host,root,cwd,perms,dotenv,venv,node,git,jobs";
|
||||
};
|
||||
};
|
||||
direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue