40 lines
846 B
Nix
40 lines
846 B
Nix
|
|
{ pkgs, ... }:
|
||
|
|
|
||
|
|
let
|
||
|
|
shellInitScript =
|
||
|
|
builtins.replaceStrings
|
||
|
|
[ "@ATUIN@" "@STARSHIP@" "@BASHPREEXEC@" ]
|
||
|
|
[
|
||
|
|
"${pkgs.atuin}/bin/atuin"
|
||
|
|
"${pkgs.starship}/bin/starship"
|
||
|
|
"${pkgs.bash-preexec}/share/bash/bash-preexec.sh"
|
||
|
|
]
|
||
|
|
(builtins.readFile ../../scripts/shell-init.sh);
|
||
|
|
in
|
||
|
|
{
|
||
|
|
|
||
|
|
environment.systemPackages = [
|
||
|
|
pkgs.atuin
|
||
|
|
pkgs.bat
|
||
|
|
pkgs.eza
|
||
|
|
pkgs.fzf
|
||
|
|
pkgs.starship
|
||
|
|
pkgs.ugrep
|
||
|
|
pkgs.zoxide
|
||
|
|
];
|
||
|
|
|
||
|
|
# Use Ghostty as the default terminal emulator.
|
||
|
|
environment.sessionVariables = {
|
||
|
|
TERMINAL = "${pkgs.ghostty}/bin/ghostty";
|
||
|
|
DEFAULT_TERMINAL = "${pkgs.ghostty}/bin/ghostty";
|
||
|
|
};
|
||
|
|
|
||
|
|
programs.bash = {
|
||
|
|
enable = true;
|
||
|
|
interactiveShellInit = shellInitScript;
|
||
|
|
loginShellInit = shellInitScript;
|
||
|
|
promptInit = ""; # avoid overriding Starship prompt
|
||
|
|
};
|
||
|
|
|
||
|
|
}
|