41 lines
972 B
Nix
41 lines
972 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.
|
|
# On some machines Ghostty may fail to acquire an OpenGL context; `ghostty-cairo`
|
|
# forces GTK4's Cairo renderer (CPU) and is more hardware-agnostic.
|
|
environment.sessionVariables = {
|
|
TERMINAL = "ghostty-cairo";
|
|
DEFAULT_TERMINAL = "ghostty-cairo";
|
|
};
|
|
|
|
programs.bash = {
|
|
enable = true;
|
|
interactiveShellInit = shellInitScript;
|
|
loginShellInit = shellInitScript;
|
|
promptInit = ""; # avoid overriding Starship prompt
|
|
};
|
|
|
|
}
|