Skip to content

Commit

Permalink
homes: start nushell conf
Browse files Browse the repository at this point in the history
  • Loading branch information
adfaure committed Jul 18, 2024
1 parent 22cbbae commit 06386b5
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
4 changes: 3 additions & 1 deletion homes/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
./modules/emacs
./modules/vim-tmux-panes
./modules/eza
# ./modules/nushell
./modules/nushell
];

# Top level configuration for the user adfaure (me!)
Expand All @@ -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 = {
Expand Down Expand Up @@ -55,6 +56,7 @@

programs.starship = {
enable = true;
enableNushellIntegration = true;
catppuccin.enable = true;
catppuccin.flavour = "frappe";

Expand Down
48 changes: 48 additions & 0 deletions homes/modules/nushell/default.nix
Original file line number Diff line number Diff line change
@@ -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 = "";
};
};
};
}
2 changes: 2 additions & 0 deletions nixos/profiles/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 06386b5

Please sign in to comment.