modules/shell: init

This commit is contained in:
Charlie Root 2024-10-25 14:41:43 +02:00
commit 32403d2a2a
Signed by: faukah
SSH key fingerprint: SHA256:jpYIt4Vkz1NBTQcks/N9OPTfTFxE6KF2W/rV7hrfrIw
3 changed files with 37 additions and 0 deletions

View file

View file

@ -0,0 +1,25 @@
{
pkgs,
aliasesStr,
}:
pkgs.writeShellScriptBin "config.fish" ''
# source ${pkgs.fishPlugins.sponge}/share/zsh-defer/zsh-defer.plugin.zsh
${pkgs.atuin}/bin/atuin init fish | source
${pkgs.zoxide}/bin/zoxide init fish | source
source ${./starship.fish}
source ${./zoxide.fish}
source ${./config.fish}
zsh-defer source ${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh
zsh-defer source ${pkgs.zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh
zsh-defer source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
zsh-defer source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
zsh-defer source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh
zsh-defer source ${pkgs.zsh-autopair}/share/zsh/zsh-autopair/autopair.zsh
${aliasesStr}
''

12
modules/shell/module.nix Normal file
View file

@ -0,0 +1,12 @@
# This shell setup was inspired by sioodmy. Check out his setup!
{pkgs, ...}: let
toml = pkgs.formats.toml {};
starship-config = import ./starship.nix;
in (pkgs.symlinkJoin {
name = "fish-wrapped";
paths = [pkgs.fish pkgs.starship pkgs.fzf];
buildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/fish --set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
'';
})