From e442af49bad0570f391ebcd15fb4f73ed8a486b8 Mon Sep 17 00:00:00 2001 From: materus Date: Sun, 31 Mar 2024 00:28:17 +0100 Subject: [PATCH] home-profile: zsh add sudo plugin --- configurations/profile/home/shell/zsh.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configurations/profile/home/shell/zsh.nix b/configurations/profile/home/shell/zsh.nix index c3f43c3..6d19a84 100644 --- a/configurations/profile/home/shell/zsh.nix +++ b/configurations/profile/home/shell/zsh.nix @@ -40,6 +40,7 @@ let rev = "v1.20.0"; sha256 = "sha256-ES5vJXHjAKw/VHjWs8Au/3R+/aotSbY7PWnWAMzCR8E="; }); + sudo = makePlugin "sudo" "sudo.plugin.zsh" "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/sudo"; }; in @@ -89,6 +90,9 @@ in if [[ -f "${extraPlugins.powerlevel10k.fullPath}" ]]; then source "${extraPlugins.powerlevel10k.fullPath}" fi + if [[ -f "${extraPlugins.sudo.fullPath}" ]]; then + source "${extraPlugins.sudo.fullPath}" + fi '' }''; @@ -133,6 +137,10 @@ in __MATERUS_HM_ZSH_PRIVATE=1 ${lib.getExe config.programs.zsh.package} } + myip() { + wget -qO- https://wtfismyip.com/text + } + '' + makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''