From 101f0f282e1232001c2636430189ad02dc7486ec Mon Sep 17 00:00:00 2001 From: Tomas Rivera <137088692+Totorile1@users.noreply.github.com> Date: Sat, 28 Feb 2026 15:00:07 +0100 Subject: [PATCH] removed oh-my-posh/ use oh-my-zsh with some plugins + add a custom cat using colorize plugin --- hosts/laptop/configuration.nix | 3 ++- hosts/laptop/home.nix | 3 ++- modules/home-manager/oh-my-posh.nix | 1 - modules/home-manager/oh-my-zsh.nix | 14 ++++++++++++++ modules/home-manager/zsh.nix | 16 ++++++++++++++-- 5 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 modules/home-manager/oh-my-zsh.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 0b5133a..e37df7d 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -151,7 +151,8 @@ libreoffice gruvbox-gtk-theme hyprpicker powertop -telnet +inetutils # collections of network programs such as telnet +python313Packages.pygments # used for ccat (comment of colorize plugin from oh-my-zsh) #we need to install gnome and kde utils individually as we dont use gnome gnome-calculator snapshot diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index aa85bfb..13465d4 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -18,7 +18,8 @@ imports = [ ../../modules/home-manager/neovim.nix # dont use nixvim. broken ../../modules/home-manager/rclone.nix ../../modules/home-manager/waybar.nix -../../modules/home-manager/oh-my-posh # zsh customizer +#../../modules/home-manager/oh-my-posh.nix # zsh customizer +../../modules/home-manager/oh-my-zsh.nix # another zsh customizer ]; diff --git a/modules/home-manager/oh-my-posh.nix b/modules/home-manager/oh-my-posh.nix index 4e387cc..3dca379 100644 --- a/modules/home-manager/oh-my-posh.nix +++ b/modules/home-manager/oh-my-posh.nix @@ -6,5 +6,4 @@ enableZshIntegration = true; useTheme = "gruvbox"; }; - }; } diff --git a/modules/home-manager/oh-my-zsh.nix b/modules/home-manager/oh-my-zsh.nix new file mode 100644 index 0000000..5238aa6 --- /dev/null +++ b/modules/home-manager/oh-my-zsh.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + programs.zsh.oh-my-zsh = { + enable = true; + theme = "jonathan"; + plugins = [ + "aliases" + "alias-finder" + "colored-man-pages" + "colorize" + ]; + }; +} diff --git a/modules/home-manager/zsh.nix b/modules/home-manager/zsh.nix index a2735ff..61b2393 100644 --- a/modules/home-manager/zsh.nix +++ b/modules/home-manager/zsh.nix @@ -4,7 +4,18 @@ programs.zsh = { enable = true; autosuggestion.enable = true; - initContent = "fastfetch\n"; + initContent = '' +# Safe cat that uses colorize plugin ccat +custom-cat() { + if [[ -t 1 ]]; then + ccat "$@" + else + command cat "$@" + fi +} + + fastfetch\n'' + ; shellAliases = { ".." = "z .."; grep = "rg"; @@ -12,6 +23,7 @@ la = "ls -A"; l = "ls -CF"; ls = "ls -hA -s --color"; - }; + cat = "custom-cat"; +}; }; }