{ config, pkgs, self, ... }: let psCfg = config.pub-solar; xdg = config.home-manager.users."${psCfg.user.name}".xdg; in { enable = true; historyControl = ["ignorespace"]; # Run when initializing a login shell profileExtra = '' [ "$(tty)" = "/dev/tty1" ] && exec ${pkgs.sway-service}/bin/sway-service ''; # Run when initializing an interactive shell initExtra = '' # If a command is not found, show me where it is source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh # Helps you navigate directories faster # https://github.com/gsamokovarov/jump eval "$(${pkgs.jump}/bin/jump shell --bind=z)" eval "$(${pkgs.direnv}/bin/direnv hook bash)" # Syntax highlighting, auto suggestions, vim modes, etc. # https://github.com/akinomyoga/ble.sh/wiki/Manual-A1-Installation#user-content-nixpkgs source "$(blesh-share)" --attach=none [[ ''${BLE_VERSION-} ]] && ble-attach # ctrl + space to accept autocomplete suggestion ble-bind -m 'auto_complete' -f 'C-@' 'auto_complete/insert-on-end' # Meta (Alt) + Backspace to delete a word ble-bind -m 'emacs' -f 'M-C-?' 'kill-backward-cword' # Meta (Alt) + p to jump one word backwards ble-bind -m 'emacs' -f M-p '@nomarked backward-cword' # Meta (Alt) + n to jump one word forwards ble-bind -m 'emacs' -f M-n '@nomarked forward-cword' # Arrow up and Ctrl + p searches history for entered input ble-bind -f up 'history-search-backward hide-status:immediate-accept:empty=emulate-readline:point=end' ble-bind -f C-p 'history-search-backward hide-status:immediate-accept:empty=emulate-readline:point=end' # Arrow down and Ctrl + n searches history for entered input ble-bind -f down 'history-search-forward hide-status:immediate-accept:empty=emulate-readline:point=end' ble-bind -f C-n 'history-search-forward hide-status:immediate-accept:empty=emulate-readline:point=end' bleopt filename_ls_colors="$LS_COLORS" source ${config.age.secrets.environment-secrets.path} ''; shellAliases = { nano = "nvim"; vi = "nvim"; vim = "nvim"; mutt = "neomutt"; ls = "exa"; la = "exa --group-directories-first -lag"; fm = "vifm ."; vifm = "vifm ."; wget = "wget --hsts-file=$XDG_CACHE_HOME/wget-hsts"; irssi = "irssi --config=$XDG_CONFIG_HOME/irssi/config --home=$XDG_DATA_HOME/irssi"; drone = "DRONE_TOKEN=$(secret-tool lookup drone token) drone"; no = "manix \"\" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview=\"manix '{}'\" | xargs manix"; # fix nixos-option nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat"; myip = "dig +short myip.opendns.com @208.67.222.222 2>&1"; }; }