From 74188a0271c0724a8f11c94e80021202b30f5a65 Mon Sep 17 00:00:00 2001 From: Isshi0417 Date: Sat, 6 Jul 2024 22:57:59 +0900 Subject: [PATCH] Modularize zsh themes --- hosts/default/home.nix | 2 +- .../{zsh.nix => shell/themes/dracula.nix} | 25 ---------------- modules/home-manager/shell/zsh.nix | 30 +++++++++++++++++++ 3 files changed, 31 insertions(+), 26 deletions(-) rename modules/home-manager/{zsh.nix => shell/themes/dracula.nix} (59%) create mode 100644 modules/home-manager/shell/zsh.nix diff --git a/hosts/default/home.nix b/hosts/default/home.nix index 6bdf3e6..ae9ee7d 100644 --- a/hosts/default/home.nix +++ b/hosts/default/home.nix @@ -4,7 +4,7 @@ imports = [ ../../modules/home-manager/git.nix - ../../modules/home-manager/zsh.nix + ../../modules/home-manager/shell/zsh.nix ../../modules/home-manager/themes/basic-gtk.nix ]; diff --git a/modules/home-manager/zsh.nix b/modules/home-manager/shell/themes/dracula.nix similarity index 59% rename from modules/home-manager/zsh.nix rename to modules/home-manager/shell/themes/dracula.nix index 24fad85..e9b8e4f 100644 --- a/modules/home-manager/zsh.nix +++ b/modules/home-manager/shell/themes/dracula.nix @@ -1,31 +1,6 @@ { pkgs, ... }: { - # Download zsh packages - home.packages = with pkgs; [ - zsh - oh-my-zsh - starship - ]; - - # Enable zsh - programs.zsh = { - enable = true; - enableCompletion = true; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - - # oh-my-zsh - oh-my-zsh = { - enable = true; - plugins = [ - "git" - ]; - theme = "robbyrussell"; - }; - }; - - # Configure starship programs.starship = { enable = true; enableZshIntegration = true; diff --git a/modules/home-manager/shell/zsh.nix b/modules/home-manager/shell/zsh.nix new file mode 100644 index 0000000..10f63ec --- /dev/null +++ b/modules/home-manager/shell/zsh.nix @@ -0,0 +1,30 @@ +{ pkgs, ... }: + +{ + imports = [ + ./themes/dracula.nix + ]; + + # Download zsh packages + home.packages = with pkgs; [ + zsh + oh-my-zsh + starship + ]; + + # Enable zsh + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + # oh-my-zsh + oh-my-zsh = { + enable = true; + plugins = [ + "git" + ]; + }; + }; +} \ No newline at end of file