From 539ba9fef7142676cf20cb7381ef29192fb27973 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Sat, 26 Jul 2025 22:07:28 +0200 Subject: [PATCH] Reorganize configuration into modular directory structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Create modules/ directory for Nix configuration modules - Create config/ directory for configuration files - Move nvim.nix, tmux.nix, zsh.nix to modules/ - Move p10k.zsh to config/ - Update flake.nix import paths to reference new structure - Update zsh.nix p10k.zsh path reference - Update README.md architecture documentation - Keep tmux.sh at root for easy accessibility This provides better separation between Nix modules and config files while maintaining a clean, scalable structure. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- README.md | 12 +++++++----- p10k.zsh => config/p10k.zsh | 0 flake.nix | 6 +++--- nvim.nix => modules/nvim.nix | 0 tmux.nix => modules/tmux.nix | 0 zsh.nix => modules/zsh.nix | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) rename p10k.zsh => config/p10k.zsh (100%) rename nvim.nix => modules/nvim.nix (100%) rename tmux.nix => modules/tmux.nix (100%) rename zsh.nix => modules/zsh.nix (97%) diff --git a/README.md b/README.md index 6889214..ec6b884 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,13 @@ home-manager switch --flake github:Logan-Lin/nix-config#yanlin ``` . ├── flake.nix # Main flake configuration and package definitions -├── nvim.nix # Neovim configuration with plugins and keymaps -├── tmux.nix # Tmux setup with vim-like navigation -├── zsh.nix # Zsh with Powerlevel10k and modern CLI tools -├── p10k.zsh # Powerlevel10k theme configuration (managed by Nix) -└── tmux.sh # Tmux session automation script +├── tmux.sh # Tmux session automation script +├── modules/ # Nix configuration modules +│ ├── nvim.nix # Neovim configuration with plugins and keymaps +│ ├── tmux.nix # Tmux setup with vim-like navigation +│ └── zsh.nix # Zsh with Powerlevel10k and modern CLI tools +└── config/ # Configuration files + └── p10k.zsh # Powerlevel10k theme configuration ``` ## 🛠️ Software Configurations diff --git a/p10k.zsh b/config/p10k.zsh similarity index 100% rename from p10k.zsh rename to config/p10k.zsh diff --git a/flake.nix b/flake.nix index 3d391fe..d00bc27 100644 --- a/flake.nix +++ b/flake.nix @@ -30,9 +30,9 @@ homeConfiguration = { pkgs, ... }: { imports = [ nixvim.homeManagerModules.nixvim - ./nvim.nix - ./tmux.nix - ./zsh.nix + ./modules/nvim.nix + ./modules/tmux.nix + ./modules/zsh.nix ]; home.username = "yanlin"; diff --git a/nvim.nix b/modules/nvim.nix similarity index 100% rename from nvim.nix rename to modules/nvim.nix diff --git a/tmux.nix b/modules/tmux.nix similarity index 100% rename from tmux.nix rename to modules/tmux.nix diff --git a/zsh.nix b/modules/zsh.nix similarity index 97% rename from zsh.nix rename to modules/zsh.nix index 915ab6e..8725e18 100644 --- a/zsh.nix +++ b/modules/zsh.nix @@ -94,5 +94,5 @@ }; # Manage Powerlevel10k configuration - home.file.".p10k.zsh".source = ./p10k.zsh; + home.file.".p10k.zsh".source = ../config/p10k.zsh; } \ No newline at end of file