From 2ccda9b91848c44a3ade536d49903ffa8550f898 Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 8 Nov 2024 09:38:25 -0500 Subject: [PATCH] ZSH: revert back to oh-my-zsh --- modules/users/aires/default.nix | 5 ++- modules/users/common/home-manager/zsh.nix | 43 +++++++++++++++-------- modules/users/gremlin/default.nix | 7 ++++ modules/users/root/default.nix | 2 ++ 4 files changed, 41 insertions(+), 16 deletions(-) diff --git a/modules/users/aires/default.nix b/modules/users/aires/default.nix index 10013d6..cffe6db 100644 --- a/modules/users/aires/default.nix +++ b/modules/users/aires/default.nix @@ -91,8 +91,11 @@ in matchBlocks = config.secrets.users.aires.sshConfig; }; - # Tweak Zsh + # Set up Zsh zsh = { + oh-my-zsh = { + theme = "gentoo"; + }; shellAliases = { nos = "nixos-operations-script"; z = "zellij"; diff --git a/modules/users/common/home-manager/zsh.nix b/modules/users/common/home-manager/zsh.nix index d4cd026..8c40708 100644 --- a/modules/users/common/home-manager/zsh.nix +++ b/modules/users/common/home-manager/zsh.nix @@ -1,27 +1,40 @@ # Additional ZSH settings via Home Manager -{ ... }: +{ pkgs, ... }: { programs = { - # Set up Starship - # https://starship.rs/ - starship = { - enable = true; - enableZshIntegration = true; - }; + command-not-found.enable = true; + zsh = { enable = true; autosuggestion.enable = true; syntaxHighlighting.enable = true; history.ignoreDups = true; # Do not enter command lines into the history list if they are duplicates of the previous event. - initExtra = '' - function set_win_title(){ - echo -ne "\033]0; $(basename "$PWD") \007" + prezto = { + git.submoduleIgnore = "untracked"; # Ignore submodules when they are untracked. + }; + plugins = [ + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "v0.8.0"; + sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; + }; } - precmd_functions+=(set_win_title) - - bindkey "^[[1;5C" forward-word - bindkey "^[[1;5D" backward-word - ''; + ]; + oh-my-zsh = { + enable = true; + plugins = [ + "command-not-found" + "direnv" + "dotenv" + "extract" + "git" + "systemd" + ]; + }; }; }; } diff --git a/modules/users/gremlin/default.nix b/modules/users/gremlin/default.nix index 17771a4..2edccd1 100644 --- a/modules/users/gremlin/default.nix +++ b/modules/users/gremlin/default.nix @@ -90,6 +90,13 @@ in enable = true; matchBlocks = config.secrets.users.gremlin.sshConfig; }; + + # Set up Zsh + zsh = { + oh-my-zsh = { + theme = "gnzh"; + }; + }; }; }; }) diff --git a/modules/users/root/default.nix b/modules/users/root/default.nix index cfc3fc6..b974d3e 100644 --- a/modules/users/root/default.nix +++ b/modules/users/root/default.nix @@ -1,6 +1,8 @@ { ... }: { home-manager.users.root = { + imports = [ ../common/home-manager/zsh.nix ]; + home.stateVersion = "24.05"; programs.zsh = { oh-my-zsh.theme = "kardan";