{ # pkgs, config, lib, ... }: with lib; let cfg = config.shell.nushell; in { options = { shell.nushell.enable = mkEnableOption "enable nushell"; }; config = mkIf cfg.enable { programs = { eza.enableNushellIntegration = false; atuin = { enable = false; enableNushellIntegration = true; flags = [ "--disable-up-arrow" ]; }; carapace.enable = true; nushell = { enable = true; environmentVariables = { CARAPACE_BRIDGES = "fish"; CARAPACE_MATCH = 1; EDITOR = "hx"; }; shellAliases = { cd = "z"; # ed = "$env.EDITOR"; jf = "jj-fzf"; # think of jeff jo = "joshuto"; # think of josh l = "ls -la"; la = "ls -a"; ll = "ls -l"; nix-shell = "nix-shell --command nu"; p = "pueue"; s = "systemctl"; }; extraConfig = '' $env.config = { show_banner: false shell_integration: { osc2: true osc7: true osc8: true osc9_9: false osc133: true osc633: true reset_application_mode: true } ls: { use_ls_colors: true clickable_links: true } rm: { always_trash: true } completions: { case_sensitive: false quick: true partial: true algorithm: "fuzzy" } } ''; }; }; }; }