From dfa984831d48582fefc977b9aa27ec20dde4bf75 Mon Sep 17 00:00:00 2001 From: Akshith G Date: Thu, 19 Feb 2026 23:45:50 -0800 Subject: [PATCH] Remove Zprezto/p10k and add Makefile help target (#37) * Strip Zprezto and p10k from cloud-init shell config * Add help as default Makefile target --- Makefile | 15 ++++--- dropkit/templates/default-cloud-init.yaml | 49 ++++++----------------- 2 files changed, 22 insertions(+), 42 deletions(-) diff --git a/Makefile b/Makefile index 7f60e10..c0fb9d6 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,19 @@ -.PHONY: dev lint format test audit +.PHONY: help dev lint format test audit -dev: +help: ## Show available targets + @grep -E '^[a-zA-Z_-]+:.*##' $(MAKEFILE_LIST) | awk -F ':.*## ' '{printf " %-12s %s\n", $$1, $$2}' + +dev: ## Install all dependencies uv sync --all-groups -lint: +lint: ## Run linter and type checker uv run ruff format --check . && uv run ruff check . && uv run ty check dropkit/ -format: +format: ## Auto-format code uv run ruff format . -test: +test: ## Run tests uv run pytest -audit: +audit: ## Audit dependencies for vulnerabilities uv run pip-audit diff --git a/dropkit/templates/default-cloud-init.yaml b/dropkit/templates/default-cloud-init.yaml index 70826be..828e1c4 100644 --- a/dropkit/templates/default-cloud-init.yaml +++ b/dropkit/templates/default-cloud-init.yaml @@ -20,7 +20,6 @@ packages: - curl - wget - build-essential - - fontconfig - neovim - apt-transport-https - ca-certificates @@ -47,39 +46,29 @@ write_files: permissions: '0644' defer: true content: | - # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. - # Initialization code that may require console input (password prompts, [y/n] - # confirmations, etc.) must go above this block; everything else may go below. - if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" - fi + # Prompt: user@host:dir (green for normal, red after failed command) + PROMPT='%F{%(?.green.red)}%n@%m%f:%F{blue}%~%f$ ' - DEFAULT_USER="{{ username }}" + # History + HISTFILE=~/.zsh_history + HISTSIZE=10000 + SAVEHIST=10000 + setopt SHARE_HISTORY HIST_IGNORE_DUPS HIST_IGNORE_SPACE - # Zprezto + prompt configuration - source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" + # Completion + autoload -Uz compinit && compinit + zstyle ':completion:*' menu select - autoload -Uz promptinit - promptinit - prompt powerlevel10k + # Key bindings + bindkey -e - # You may need to manually set your language environment export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 - - # Preferred editor for local and remote sessions export EDITOR='nvim' export LESS='-R' - - # Disable open-interpreter telemetry - export DISABLE_TELEMETRY=true - - alias vim="nvim" - export PATH="$PATH:/home/{{ username }}/.local/bin" - # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. - [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + alias vim="nvim" # Run commands after boot runcmd: @@ -117,18 +106,6 @@ runcmd: - su {{ username }} -c "git config --global user.name '{{ full_name }}'" - su {{ username }} -c "git config --global user.email '{{ email }}'" - # Install zprezto for user - - su {{ username }} -c "zsh -c 'git clone --recursive https://github.com/sorin-ionescu/prezto.git /home/{{ username }}/.zprezto'" - - # Create Zsh configuration using setopt EXTENDED_GLOB and loop through runcoms - - | - su {{ username }} -c "zsh -c ' - setopt EXTENDED_GLOB - for rcfile in /home/{{ username }}/.zprezto/runcoms/^README.md(.N); do - ln -s "\$rcfile" "/home/{{ username }}/.\${rcfile:t}" - done - '" - # Set Zsh as default shell and ensure ownership - chsh -s /usr/bin/zsh {{ username }} - chown -R {{ username }}:{{ username }} /home/{{ username }}