modules/shell: more progress, soon working

This commit is contained in:
Charlie Root 2024-10-29 22:30:59 +01:00
commit 3bccaba78a
Signed by: faukah
SSH key fingerprint: SHA256:jpYIt4Vkz1NBTQcks/N9OPTfTFxE6KF2W/rV7hrfrIw
3 changed files with 36 additions and 6 deletions

22
modules/shell/aliases.nix Normal file
View file

@ -0,0 +1,22 @@
{pkgs, ...}: let
inherit (pkgs.lib) getExe;
in {
ls = "${getExe pkgs.eza} --icons";
la = "${getExe pkgs.eza} --icons -lha --git";
g = "git";
n = "nix";
k = "kak";
c = "clear";
cc = "cd ~ && clear";
mv = "mv -iv";
rm = "${pkgs.trash-cli}/bin/trash";
lg = "${getExe pkgs.lazygit}";
ytopus = "yt-dlp -x --embed-metadata --audio-quality 0 --audio-format opus --embed-metadata --embed-thumbnail";
cat = "${getExe pkgs.bat} --plain";
kys = "shutdown now";
}

View file

@ -13,12 +13,12 @@ pkgs.writeShellScriptBin "config.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
# 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}

View file

@ -2,6 +2,14 @@
{pkgs, ...}: let
toml = pkgs.formats.toml {};
starship-config = import ./starship.nix;
aliases = import ./aliases.nix;
fishinit = import ./fishinit.nix {inherit pkgs aliasesStr;};
aliasesStr =
pkgs.lib.concatStringsSep "\n"
(pkgs.lib.mapAttrsToList (k: v: "alias ${k}=\"${v}\"") aliases);
in (pkgs.symlinkJoin {
name = "fish-wrapped";
paths = [pkgs.fish pkgs.starship pkgs.fzf];