31 lines
694 B
Nix
31 lines
694 B
Nix
{ 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}"
|
|
'';
|
|
}
|