Skip to content

Commit

Permalink
✨ (shell): zsh -> fish
Browse files Browse the repository at this point in the history
  • Loading branch information
elythh committed Oct 19, 2024
1 parent c14bcd1 commit 4bce4e7
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/home/opt/shell/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
imports = [
./fish
./zellij
./zsh
];
Expand Down
33 changes: 33 additions & 0 deletions modules/home/opt/shell/fish/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ pkgs, ... }:
{

programs.fish = {
enable = true;
functions = {
refresh = "source $HOME/.config/fish/config.fish";
take = ''mkdir -p -- "$1" && cd -- "$1"'';
ttake = "cd $(mktemp -d)";
show_path = "echo $PATH | tr ' ' '\n'";
posix-source = ''
for i in (cat $argv)
set arr (echo $i |tr = \n)
set -gx $arr[1] $arr[2]
end
'';
};
plugins = [
{
inherit (pkgs.fishPlugins.autopair) src;
name = "autopair";
}
{
inherit (pkgs.fishPlugins.done) src;
name = "done";
}
{
inherit (pkgs.fishPlugins.sponge) src;
name = "sponge";
}
];
};
}
1 change: 1 addition & 0 deletions modules/nixos/core/environment.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
shells = with pkgs; [
nushell
zsh
fish
];
variables.FLAKE = "/etc/nixos";
};
Expand Down
1 change: 1 addition & 0 deletions modules/nixos/opt/programs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
];
};
zsh.enable = true;
fish.enable = true;
dconf.enable = true;
wshowkeys.enable = true;
};
Expand Down
2 changes: 1 addition & 1 deletion modules/nixos/opt/user.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"adbusers"
];
};
defaultUserShell = pkgs.zsh;
defaultUserShell = pkgs.fish;
};
}

0 comments on commit 4bce4e7

Please sign in to comment.