move to nushell
This commit is contained in:
parent
fdd9dd20ae
commit
caf9810290
24 changed files with 521 additions and 469 deletions
|
|
@ -17,47 +17,35 @@ in {
|
|||
programs.nushell = {
|
||||
enable = true;
|
||||
|
||||
# Nushell doesn't need generateCompletions like fish
|
||||
|
||||
extraConfig = ''
|
||||
# Environment variables
|
||||
let-env LC_ALL = "en_US.UTF-8"
|
||||
let-env SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"
|
||||
let-env FLAKE = "/home/zoey/nixos/"
|
||||
$env.config.show_banner = false
|
||||
|
||||
# FZF settings
|
||||
let-env FZF_PREVIEW_FILE_CMD = "head -n 10"
|
||||
let-env FZF_PREVIEW_DIR_CMD = "ls"
|
||||
|
||||
def pf [] {
|
||||
fzf --bind ctrl-y:preview-up,ctrl-e:preview-down \
|
||||
--bind ctrl-b:preview-page-up,ctrl-f:preview-page-down \
|
||||
--bind ctrl-u:preview-half-page-up,ctrl-d:preview-half-page-down \
|
||||
--bind ctrl-k:up,ctrl-j:down \
|
||||
--preview='bat --style=numbers --color=always --line-range :100 {}'
|
||||
if ('TMUX' in $env == false) {
|
||||
exec tmux
|
||||
}
|
||||
|
||||
def ff [] {
|
||||
let files = (pf)
|
||||
for file in $files {
|
||||
let cmd = $"v ($file)"
|
||||
echo $cmd
|
||||
nu -c $cmd
|
||||
}
|
||||
}
|
||||
fastfetch --config minimal
|
||||
'';
|
||||
|
||||
# Nushell handles plugins differently, you might want to use modules instead
|
||||
# or configure external tools directly
|
||||
|
||||
extraEnv = ''
|
||||
# Add any environment-specific configuration here
|
||||
# Environment variables
|
||||
$env.LC_ALL = "en_US.UTF-8"
|
||||
|
||||
$env.SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"
|
||||
$env.FLAKE = "/home/zoey/nixos/"
|
||||
|
||||
# FZF settings
|
||||
$env.FZF_PREVIEW_FILE_CMD = "head -n 10"
|
||||
$env.FZF_PREVIEW_DIR_CMD = "ls"
|
||||
'';
|
||||
|
||||
# Import aliases (you'll need to convert fish aliases to Nushell format)
|
||||
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
|
||||
};
|
||||
|
||||
programs.carapace.enable = true;
|
||||
programs.carapace.enableNushellIntegration = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gnumake
|
||||
comma
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue