nixos-config/home/modules/shell.nix

104 lines
2.7 KiB
Nix
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
config,
pkgs,
lib,
inputs,
...
}: {
programs = {
zsh = {
enable =
if (config.os == "linux")
then true
else false;
oh-my-zsh = {
enable = true;
plugins = ["git"];
theme = "lambda";
};
initExtraFirst =
if !(config.os == "linux")
then "export PATH=$PATH:~/.cargo/bin/\n${pkgs.pfetch-rs}/bin/pfetch\n"
else
"${pkgs.pfetch-rs}/bin/pfetch\n"
+ (
if config.host == "asmodeus"
then "comin status\n"
else ""
);
plugins = [
{
name = "zsh-autocomplete";
src = pkgs.fetchFromGitHub {
owner = "marlonrichert";
repo = "zsh-autocomplete";
rev = "23.07.13";
sha256 = "sha256-/6V6IHwB5p0GT1u5SAiUa20LjFDSrMo731jFBq/bnpw=";
};
}
];
};
atuin = {
enable = true;
enableNushellIntegration = true;
settings = {
style = "compact";
inline_height = 10;
};
};
eza.enable = true;
nushell = {
enable = true;
shellAliases = {
ls = "eza -l --icons --tree --level 2 --header --git --group-directories-first";
# reload = "clear; source $nu.config-path";
};
extraConfig = "maxfetch";
configFile = {
text = builtins.readFile ../config-files/config.nu;
};
};
carapace.enable = true;
carapace.enableNushellIntegration = true;
starship = let
flavour = "mocha";
in {
enable = true;
enableNushellIntegration = true;
enableBashIntegration = true;
enableZshIntegration = true;
settings =
{
# Other config here
character = {
success_symbol = "[λ::](bold green)";
error_symbol = "[λ::](bold red)";
};
username = {
style_user = "bold pink";
format = "[$user]($style)";
show_always = true;
disabled = false;
};
hostname = {
ssh_only = false;
format = "[ 🏳 ](bold pink)[$hostname](bold flamingo)";
disabled = false;
};
right_format = "$all";
format = ''
$username$hostname in $directory
$character'';
palette = "catppuccin_${flavour}";
}
// builtins.fromTOML (builtins.readFile (pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "starship";
rev = "5629d2356f62a9f2f8efad3ff37476c19969bd4f"; # Replace with the latest commit hash
sha256 = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0=";
}
+ /palettes/${flavour}.toml));
};
};
}