Add shell module and bootstrap fixes
This commit is contained in:
parent
280f83488b
commit
879754cb8d
5 changed files with 202 additions and 1 deletions
39
modules/system/shell.nix
Normal file
39
modules/system/shell.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ 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
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue