From f333315cfbc886e0a2e3e17f9122196601d4b1f3 Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 11 Apr 2024 18:01:37 +0530 Subject: [PATCH] add zsh --- hosts/default/home.nix | 19 ------------------ modules/home-manager/default.nix | 2 ++ modules/home-manager/zsh/default.nix | 29 ++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 modules/home-manager/zsh/default.nix diff --git a/hosts/default/home.nix b/hosts/default/home.nix index 105b554..5662465 100644 --- a/hosts/default/home.nix +++ b/hosts/default/home.nix @@ -106,25 +106,6 @@ "electron-25.9.0" ]; - programs.zsh = { - enable = true; - enableCompletion = true; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - # enableBashCompletion = true; - oh-my-zsh = { - enable = true; - theme = "ys"; - plugins = ["git" "colored-man-pages" "extract" "sudo"]; - }; - initExtra = '' - eval "$(direnv hook zsh)" - eval "$(starship init zsh)" - alias vv=nvim - alias yt-dlp-1080="yt-dlp -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]'" - ''; - }; - programs.kitty = { enable = true; keybindings = { diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index d2c444d..e55208f 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -2,9 +2,11 @@ imports = [ ./bash ./session-vars + ./zsh ]; nixpkgs.config.allowUnfree = true; bash.enable = lib.mkDefault true; + zsh.enable = lib.mkDefault true; } diff --git a/modules/home-manager/zsh/default.nix b/modules/home-manager/zsh/default.nix new file mode 100644 index 0000000..19eaeeb --- /dev/null +++ b/modules/home-manager/zsh/default.nix @@ -0,0 +1,29 @@ +{ + config, + lib, + ... +}: { + options = { + zsh.enable = lib.mkEnableOption "enable zsh"; + }; + config = lib.mkIf config.zsh.enable { + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + # enableBashCompletion = true; + oh-my-zsh = { + enable = true; + theme = "ys"; + plugins = ["git" "colored-man-pages" "extract" "sudo"]; + }; + initExtra = '' + eval "$(direnv hook zsh)" + eval "$(starship init zsh)" + alias vv=nvim + alias yt-dlp-1080="yt-dlp -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]'" + ''; + }; + }; +}