mirror of
https://codeberg.org/muon/home.git
synced 2026-03-08 03:25:16 +00:00
Add wezterm
This commit is contained in:
parent
9568bf4a6e
commit
6b01ee918a
5 changed files with 393 additions and 1 deletions
71
modules/home/terminal/nushell.nix
Normal file
71
modules/home/terminal/nushell.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.mods.terminal;
|
||||
|
||||
aliases = {
|
||||
la = "ls -la";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
"...." = "cd ../../..";
|
||||
"....." = "cd ../../../..";
|
||||
"......" = "cd ../../../../..";
|
||||
};
|
||||
in {
|
||||
options.mods.terminal.nushell.enable = lib.mkEnableOption "enables nushell";
|
||||
|
||||
config = lib.mkIf cfg.nushell.enable {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
|
||||
shellAliases = aliases;
|
||||
|
||||
# vi mode + sensible defaults
|
||||
extraConfig = ''
|
||||
$env.config = {
|
||||
show_banner: false
|
||||
edit_mode: vi
|
||||
|
||||
cursor_shape: {
|
||||
vi_insert: line
|
||||
vi_normal: block
|
||||
}
|
||||
|
||||
history: {
|
||||
max_size: 2097152
|
||||
sync_on_enter: true
|
||||
file_format: "sqlite"
|
||||
isolation: false
|
||||
}
|
||||
|
||||
completions: {
|
||||
case_sensitive: false
|
||||
quick: true
|
||||
partial: true
|
||||
algorithm: "fuzzy"
|
||||
}
|
||||
|
||||
table: {
|
||||
mode: rounded
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
# Carry over zsh session variables
|
||||
extraEnv = lib.optionalString config.mods.terminal.development.enable ''
|
||||
$env.EDITOR = "nvim"
|
||||
'';
|
||||
};
|
||||
|
||||
# Starship prompt (same as zsh)
|
||||
programs.starship.enable = true;
|
||||
|
||||
# direnv nushell integration
|
||||
programs.direnv = lib.mkIf config.mods.terminal.development.enable {
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue