diff --git a/homes/base.nix b/homes/base.nix index 1b04ef7..8e6fbaa 100644 --- a/homes/base.nix +++ b/homes/base.nix @@ -16,7 +16,7 @@ ./modules/emacs ./modules/vim-tmux-panes ./modules/eza - # ./modules/nushell + ./modules/nushell ]; # Top level configuration for the user adfaure (me!) @@ -28,6 +28,7 @@ adfaure.home-modules.vim-tmux-nav-conf.enable = true; adfaure.home-modules.eza-alias.enable = true; my-programs.emacs.enable = false; + my-programs.nushell.enable = true; # Small git config (should I make a dedicated module?) programs.git = { @@ -55,6 +56,7 @@ programs.starship = { enable = true; + enableNushellIntegration = true; catppuccin.enable = true; catppuccin.flavour = "frappe"; diff --git a/homes/modules/nushell/default.nix b/homes/modules/nushell/default.nix new file mode 100644 index 0000000..5cd2e5d --- /dev/null +++ b/homes/modules/nushell/default.nix @@ -0,0 +1,48 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.my-programs.nushell; +in { + options = { + my-programs.nushell = { + enable = lib.mkOption { + default = false; + description = '' + Whether to enable nushell module. + ''; + }; + }; + }; + + config = lib.mkIf cfg.enable { + programs.nushell = { + enable = true; + shellAliases = { + r = "ranger"; + t1 = "tree -L 1"; + t2 = "tree -L 2"; + t3 = "tree -L 3"; + + v = "vim"; + vim = "nvim"; + t = "task"; + b = "bat"; + ns = "nix-shell"; + cat = ''bat --paging=never --style="plain"''; + ranger = "ranger --confdir=$HOME/.config/ranger"; + # vim = ''nvim''; + j = "jump"; + # So remote shells are not completly lost because they don't know kitty + ssh = "TERM=xterm-color ssh"; + }; + + environmentVariables = { + EDITOR = "nvim"; + SSH_ASK_PATH = ""; + }; + }; + }; +} diff --git a/nixos/profiles/common/default.nix b/nixos/profiles/common/default.nix index f76c47e..6e49dd8 100644 --- a/nixos/profiles/common/default.nix +++ b/nixos/profiles/common/default.nix @@ -14,10 +14,12 @@ with lib; { ../../modules/cachix # Simple guix module with guix sevice enabled and package added to env ../../modules/guix + ../../modules/nushell ]; adfaure.modules.my-guix.enable = true; adfaure.services.syncthing.enable = true; + adfaure.my-programs.nushell = true; # use Vim by default environment.shellAliases = {