Add comprehensive project shortcuts system
- Create config/projects.nix for project definitions with templates - Add scripts/templates/ with basic, content, and research workflows - Create universal project-launcher.sh for template execution - Integrate project system into zsh with dynamic alias generation - Generate projects.json config file for shell script consumption - Update README.md with project shortcuts documentation Projects supported: - blog: Personal blog (content workflow) - mdshortcut: Research project (research workflow) - nix-config: Nix configuration (basic workflow) Usage: proj, blog, mdshortcut, nix-config commands 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
539ba9fef7
commit
af7b855faf
7 changed files with 260 additions and 3 deletions
|
|
@ -1,5 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
projectsConfig = import ../config/projects.nix;
|
||||
projectLauncher = ../scripts/project-launcher.sh;
|
||||
in
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
|
@ -32,7 +36,18 @@
|
|||
# Nix helpers
|
||||
hm = "home-manager";
|
||||
hms = "home-manager switch --flake ~/.config/nix#yanlin";
|
||||
};
|
||||
|
||||
# Project shortcuts
|
||||
proj = "${projectLauncher}";
|
||||
} // (
|
||||
# Generate project aliases dynamically
|
||||
builtins.listToAttrs (
|
||||
builtins.map (projectName: {
|
||||
name = projectName;
|
||||
value = "${projectLauncher} ${projectName}";
|
||||
}) (builtins.attrNames projectsConfig.projects)
|
||||
)
|
||||
);
|
||||
|
||||
initContent = ''
|
||||
# Load Powerlevel10k theme
|
||||
|
|
@ -95,4 +110,7 @@
|
|||
|
||||
# Manage Powerlevel10k configuration
|
||||
home.file.".p10k.zsh".source = ../config/p10k.zsh;
|
||||
|
||||
# Generate projects.json for shell scripts
|
||||
home.file.".config/nix/config/projects.json".text = builtins.toJSON projectsConfig;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue