diff --git a/modules/shell/aliases.nix b/modules/shell/aliases.nix new file mode 100644 index 0000000..1816340 --- /dev/null +++ b/modules/shell/aliases.nix @@ -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"; +} diff --git a/modules/shell/fishinit.nix b/modules/shell/fishinit.nix index 821d510..58d329f 100644 --- a/modules/shell/fishinit.nix +++ b/modules/shell/fishinit.nix @@ -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} diff --git a/modules/shell/module2.nix b/modules/shell/module2.nix index 8533e81..ee7f2ad 100644 --- a/modules/shell/module2.nix +++ b/modules/shell/module2.nix @@ -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];