the great update
This commit is contained in:
30
user/wrapped/bash/default.nix
Normal file
30
user/wrapped/bash/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
lsCmd = "eza -la --git -s type";
|
||||
bashrc = pkgs.writeShellScript ".bashrc" ''
|
||||
[[ $- == *i* ]] || return
|
||||
|
||||
eval "$(fzf --bash)"
|
||||
eval "$(zoxide init bash)"
|
||||
|
||||
HISTFILESIZE=100000
|
||||
HISTSIZE=1000
|
||||
|
||||
alias cd=z
|
||||
alias l="${lsCmd}"
|
||||
alias ls="${lsCmd}"
|
||||
alias update-flake="nix flake update"
|
||||
|
||||
if [[ ! -v BASH_COMPLETION_VERSINFO ]]; then
|
||||
. "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh"
|
||||
fi
|
||||
'';
|
||||
in
|
||||
pkgs.symlinkJoin {
|
||||
name = "bash-wrapped";
|
||||
paths = with pkgs; [ bash bash-completion];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/bash --add-flags "--rcfile ${bashrc}"
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user