working fish shell
This commit is contained in:
parent
2d5ee6c621
commit
8b92b025f3
17 changed files with 134 additions and 109 deletions
22
modules/user/shell/aliases.nix
Normal file
22
modules/user/shell/aliases.nix
Normal 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";
|
||||
}
|
0
modules/user/shell/config.fish
Normal file
0
modules/user/shell/config.fish
Normal file
26
modules/user/shell/default.nix
Normal file
26
modules/user/shell/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
# This shell setup was inspired by sioodmy. Check out his setup!
|
||||
{pkgs, ...}: let
|
||||
toml = pkgs.formats.toml {};
|
||||
starship-config = import ./starship.nix;
|
||||
aliases = import ./aliases.nix {inherit pkgs;};
|
||||
|
||||
fishinit = import ./fishinit.nix {inherit pkgs aliasesStr;};
|
||||
|
||||
aliasesStr =
|
||||
pkgs.lib.concatStringsSep "\n"
|
||||
(pkgs.lib.mapAttrsToList (k: v: "alias ${k}=\"${v}\"") aliases);
|
||||
packages = import ./packages.nix pkgs;
|
||||
in
|
||||
(pkgs.symlinkJoin {
|
||||
name = "fish-wrapped";
|
||||
paths = [pkgs.fish] ++ packages;
|
||||
buildInputs = [pkgs.makeWrapper];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/fish --set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
|
||||
'';
|
||||
})
|
||||
.overrideAttrs (_: {
|
||||
passthru = {
|
||||
shellPath = "/bin/fish";
|
||||
};
|
||||
})
|
16
modules/user/shell/fishinit.nix
Normal file
16
modules/user/shell/fishinit.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
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 ${./config.fish}
|
||||
|
||||
|
||||
${aliasesStr}
|
||||
''
|
21
modules/user/shell/module2.nix
Normal file
21
modules/user/shell/module2.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
# This shell setup was inspired by sioodmy. Check out his setup!
|
||||
{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);
|
||||
packages = import ./packages.nix pkgs;
|
||||
in (pkgs.symlinkJoin {
|
||||
name = "fish-wrapped";
|
||||
paths = [pkgs.fish] ++ packages;
|
||||
buildInputs = [pkgs.makeWrapper];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/fish --set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
|
||||
--init-command source ${fishinit}
|
||||
'';
|
||||
})
|
71
modules/user/shell/packages.nix
Normal file
71
modules/user/shell/packages.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
pkgs: (with pkgs; [
|
||||
# better cd
|
||||
zoxide
|
||||
#better ls
|
||||
eza
|
||||
|
||||
# better cat
|
||||
bat
|
||||
|
||||
# clipboard
|
||||
yazi
|
||||
serpl
|
||||
diff-so-fancy
|
||||
tig
|
||||
|
||||
sesh
|
||||
mprocs
|
||||
curlie
|
||||
entr
|
||||
procs
|
||||
sd
|
||||
# mult
|
||||
glow
|
||||
|
||||
gdb
|
||||
# dua-cli
|
||||
dust
|
||||
kondo
|
||||
|
||||
# better grep
|
||||
ripgrep
|
||||
|
||||
# better dig
|
||||
dogdns
|
||||
|
||||
# simply the best fetch tool out there
|
||||
microfetch
|
||||
|
||||
fzf
|
||||
lldb_19
|
||||
element
|
||||
carapace
|
||||
difftastic
|
||||
hexyl
|
||||
gitui
|
||||
iputils
|
||||
gnumake
|
||||
gping
|
||||
asciinema
|
||||
inetutils
|
||||
scc
|
||||
starship
|
||||
onefetch
|
||||
wget
|
||||
cpufetch
|
||||
yt-dlp
|
||||
tealdeer
|
||||
glow
|
||||
hyperfine
|
||||
imagemagick
|
||||
ffmpeg-full
|
||||
catimg
|
||||
nmap
|
||||
wget
|
||||
fd
|
||||
jq
|
||||
rsync
|
||||
figlet
|
||||
unzip
|
||||
zip
|
||||
])
|
2
modules/user/shell/starship.nix
Normal file
2
modules/user/shell/starship.nix
Normal file
|
@ -0,0 +1,2 @@
|
|||
{
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue