···11+# espanso configuration file
22+# yaml-language-server: $schema=https://raw.githubusercontent.com/espanso/espanso/dev/schemas/config.schema.json
33+44+# For a complete introduction, visit the official docs at: https://espanso.org/docs/
+41
configs/espanso/match/base.yml
···11+# espanso match file - PUBLIC matches only
22+# Sensitive matches are in secrets.yml (encrypted with agenix)
33+# For a complete introduction, visit the official docs at: https://espanso.org/docs/
44+55+matches:
66+ # SSH public key (public by definition)
77+ - trigger: ";ssh"
88+ replace: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHm7lo7umraewipgQu1Pifmoo/V8jYGDHjBTmt+7SOCe jsp@remus"
99+1010+ # Social (public links)
1111+ - trigger: ";linkedin"
1212+ replace: "https://www.linkedin.com/in/jaspermayone/"
1313+1414+ # Organizations (public info)
1515+ - triggers: [";pwlmission"]
1616+ label: "Patchwork Mission"
1717+ replace: "Empowering everyone to explore STEAM through a makerspace community that lowers barriers, welcomes every interest, and turns ideas into reality."
1818+1919+ - triggers: [";krn"]
2020+ replace: "taciturnaxolotl"
2121+2222+ # Symbols
2323+ - trigger: ":euro"
2424+ replace: "\u20ac"
2525+2626+ - trigger: ":div"
2727+ replace: <div>$|$</div>
2828+2929+ # Commands/Scripts
3030+ - triggers: [";upd"]
3131+ replace: "curl -sSL https://raw.githubusercontent.com/jaspermayone/scripts/refs/heads/main/upgrade-system.sh | sudo bash "
3232+3333+ - triggers: [";docker"]
3434+ replace: "curl -sSL https://get.docker.com | sh"
3535+3636+ # Misc
3737+ - triggers: [";mp"]
3838+ replace: "MicroPico"
3939+4040+ - triggers: [";cf"]
4141+ replace: "doug.ns.cloudflare.com\nsaanvi.ns.cloudflare.com"
···11+# Centralized application configs
22+# Manages configs for espanso, btop, gh, wakatime, etc.
33+{ config, lib, pkgs, isDarwin, ... }:
44+55+let
66+ # Paths for secrets
77+ secretsDir = ../secrets;
88+ dotsDir = "/Users/jsp/dev/dots"; # Adjust if needed
99+in
1010+{
1111+ # btop configuration
1212+ xdg.configFile."btop/btop.conf".source = ../configs/btop.conf;
1313+1414+ # Note: gh CLI is configured in modules/git.nix via programs.gh
1515+1616+ # Karabiner configuration (keyboard remapping) - macOS only
1717+ xdg.configFile."karabiner/karabiner.json" = lib.mkIf isDarwin {
1818+ source = ../configs/karabiner.json;
1919+ };
2020+2121+ # Espanso configuration
2222+ home.file = lib.mkMerge [
2323+ # macOS espanso paths
2424+ (lib.mkIf isDarwin {
2525+ "Library/Application Support/espanso/config/default.yml".source = ../configs/espanso/config/default.yml;
2626+ "Library/Application Support/espanso/match/base.yml".source = ../configs/espanso/match/base.yml;
2727+ })
2828+2929+ # Linux espanso paths
3030+ (lib.mkIf (!isDarwin) {
3131+ ".config/espanso/config/default.yml".source = ../configs/espanso/config/default.yml;
3232+ ".config/espanso/match/base.yml".source = ../configs/espanso/match/base.yml;
3333+ })
3434+ ];
3535+3636+ # Activation script to decrypt secrets for user configs
3737+ # This runs on every home-manager activation
3838+ home.activation.decryptUserSecrets = lib.hm.dag.entryAfter ["writeBoundary"] ''
3939+ SECRETS_DIR="${dotsDir}/secrets"
4040+ AGENIX="${pkgs.age}/bin/age"
4141+ SSH_KEY="$HOME/.ssh/id_ed25519"
4242+4343+ # Only proceed if we have the SSH key for decryption
4444+ if [ -f "$SSH_KEY" ]; then
4545+ # Decrypt espanso secrets
4646+ ESPANSO_SECRETS="$SECRETS_DIR/espanso-secrets.age"
4747+ if [ -f "$ESPANSO_SECRETS" ]; then
4848+ ${if isDarwin then ''
4949+ ESPANSO_DIR="$HOME/Library/Application Support/espanso/match"
5050+ '' else ''
5151+ ESPANSO_DIR="$HOME/.config/espanso/match"
5252+ ''}
5353+ mkdir -p "$ESPANSO_DIR"
5454+ $AGENIX -d -i "$SSH_KEY" "$ESPANSO_SECRETS" > "$ESPANSO_DIR/secrets.yml" 2>/dev/null || true
5555+ fi
5656+5757+ # Decrypt wakatime API key and merge with config
5858+ WAKATIME_SECRET="$SECRETS_DIR/wakatime-api-key.age"
5959+ if [ -f "$WAKATIME_SECRET" ]; then
6060+ API_KEY=$($AGENIX -d -i "$SSH_KEY" "$WAKATIME_SECRET" 2>/dev/null || echo "")
6161+ if [ -n "$API_KEY" ]; then
6262+ cat > "$HOME/.wakatime.cfg" << EOF
6363+[settings]
6464+api_url = https://waka.hogwarts.dev/api
6565+api_key = $API_KEY
6666+debug = false
6767+status_bar_coding_activity = true
6868+status_bar_enabled = false
6969+EOF
7070+ fi
7171+ fi
7272+7373+ # Decrypt npmrc (contains registry auth tokens)
7474+ NPMRC_SECRET="$SECRETS_DIR/npmrc.age"
7575+ if [ -f "$NPMRC_SECRET" ]; then
7676+ $AGENIX -d -i "$SSH_KEY" "$NPMRC_SECRET" > "$HOME/.npmrc" 2>/dev/null || true
7777+ fi
7878+ fi
7979+ '';
8080+}
+199
rc/.p10k.zsh
···11+# Generated by Powerlevel10k configuration wizard on 2025-01-27 at 13:06 EST.
22+# Based on romkatv/powerlevel10k/config/p10k-pure.zsh, checksum 7533.
33+# Wizard options: nerdfont-v3 + powerline, small icons, pure, original, rprompt,
44+# 2 lines, sparse, transient_prompt, instant_prompt=verbose.
55+# Type `p10k configure` to generate another config.
66+#
77+# Config file for Powerlevel10k with the style of Pure (https://github.com/sindresorhus/pure).
88+#
99+# Differences from Pure:
1010+#
1111+# - Git:
1212+# - `@c4d3ec2c` instead of something like `v1.4.0~11` when in detached HEAD state.
1313+# - No automatic `git fetch` (the same as in Pure with `PURE_GIT_PULL=0`).
1414+#
1515+# Apart from the differences listed above, the replication of Pure prompt is exact. This includes
1616+# even the questionable parts. For example, just like in Pure, there is no indication of Git status
1717+# being stale; prompt symbol is the same in command, visual and overwrite vi modes; when prompt
1818+# doesn't fit on one line, it wraps around with no attempt to shorten it.
1919+#
2020+# If you like the general style of Pure but not particularly attached to all its quirks, type
2121+# `p10k configure` and pick "Lean" style. This will give you slick minimalist prompt while taking
2222+# advantage of Powerlevel10k features that aren't present in Pure.
2323+2424+# Temporarily change options.
2525+'builtin' 'local' '-a' 'p10k_config_opts'
2626+[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases')
2727+[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob')
2828+[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')
2929+'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
3030+3131+() {
3232+ emulate -L zsh -o extended_glob
3333+3434+ # Unset all configuration options.
3535+ unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
3636+3737+ # Zsh >= 5.1 is required.
3838+ [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
3939+4040+ # Prompt colors.
4141+ local grey='242'
4242+ local red='1'
4343+ local yellow='3'
4444+ local blue='4'
4545+ local magenta='5'
4646+ local cyan='6'
4747+ local white='7'
4848+4949+ # Left prompt segments.
5050+ typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
5151+ # =========================[ Line #1 ]=========================
5252+ # context # user@host
5353+ dir # current directory
5454+ vcs # git status
5555+ # command_execution_time # previous command duration
5656+ # =========================[ Line #2 ]=========================
5757+ newline # \n
5858+ # virtualenv # python virtual environment
5959+ prompt_char # prompt symbol
6060+ )
6161+6262+ # Right prompt segments.
6363+ typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
6464+ # =========================[ Line #1 ]=========================
6565+ command_execution_time # previous command duration
6666+ virtualenv # python virtual environment
6767+ context # user@host
6868+ # time # current time
6969+ # =========================[ Line #2 ]=========================
7070+ newline # \n
7171+ )
7272+7373+ # Basic style options that define the overall prompt look.
7474+ typeset -g POWERLEVEL9K_BACKGROUND= # transparent background
7575+ typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace
7676+ typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space
7777+ typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol
7878+ typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION= # no segment icons
7979+8080+ # Add an empty line before each prompt except the first. This doesn't emulate the bug
8181+ # in Pure that makes prompt drift down whenever you use the Alt-C binding from fzf or similar.
8282+ typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
8383+8484+ # Magenta prompt symbol if the last command succeeded.
8585+ typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS}_FOREGROUND=$magenta
8686+ # Red prompt symbol if the last command failed.
8787+ typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS}_FOREGROUND=$red
8888+ # Default prompt symbol.
8989+ typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
9090+ # Prompt symbol in command vi mode.
9191+ typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'
9292+ # Prompt symbol in visual vi mode is the same as in command mode.
9393+ typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='❮'
9494+ # Prompt symbol in overwrite vi mode is the same as in command mode.
9595+ typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=false
9696+9797+ # Grey Python Virtual Environment.
9898+ typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=$grey
9999+ # Don't show Python version.
100100+ typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
101101+ typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
102102+103103+ # Blue current directory.
104104+ typeset -g POWERLEVEL9K_DIR_FOREGROUND=$blue
105105+106106+ # Context format when root: user@host. The first part white, the rest grey.
107107+ typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE="%F{$white}%n%f%F{$grey}@%m%f"
108108+ # Context format when not root: user@host. The whole thing grey.
109109+ typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE="%F{$grey}%n@%m%f"
110110+ # Don't show context unless root or in SSH.
111111+ typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_CONTENT_EXPANSION=
112112+113113+ # Show previous command duration only if it's >= 5s.
114114+ typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=5
115115+ # Don't show fractional seconds. Thus, 7s rather than 7.3s.
116116+ typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
117117+ # Duration format: 1d 2h 3m 4s.
118118+ typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
119119+ # Yellow previous command duration.
120120+ typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=$yellow
121121+122122+ # Grey Git prompt. This makes stale prompts indistinguishable from up-to-date ones.
123123+ typeset -g POWERLEVEL9K_VCS_FOREGROUND=$grey
124124+125125+ # Disable async loading indicator to make directories that aren't Git repositories
126126+ # indistinguishable from large Git repositories without known state.
127127+ typeset -g POWERLEVEL9K_VCS_LOADING_TEXT=
128128+129129+ # Don't wait for Git status even for a millisecond, so that prompt always updates
130130+ # asynchronously when Git state changes.
131131+ typeset -g POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS=0
132132+133133+ # Cyan ahead/behind arrows.
134134+ typeset -g POWERLEVEL9K_VCS_{INCOMING,OUTGOING}_CHANGESFORMAT_FOREGROUND=$cyan
135135+ # Don't show remote branch, current tag or stashes.
136136+ typeset -g POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind)
137137+ # Don't show the branch icon.
138138+ typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
139139+ # When in detached HEAD state, show @commit where branch normally goes.
140140+ typeset -g POWERLEVEL9K_VCS_COMMIT_ICON='@'
141141+ # Don't show staged, unstaged, untracked indicators.
142142+ typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON=
143143+ # Show '*' when there are staged, unstaged or untracked files.
144144+ typeset -g POWERLEVEL9K_VCS_DIRTY_ICON='*'
145145+ # Show '⇣' if local branch is behind remote.
146146+ typeset -g POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON=':⇣'
147147+ # Show '⇡' if local branch is ahead of remote.
148148+ typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON=':⇡'
149149+ # Don't show the number of commits next to the ahead/behind arrows.
150150+ typeset -g POWERLEVEL9K_VCS_{COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=1
151151+ # Remove space between '⇣' and '⇡' and all trailing spaces.
152152+ typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${${${P9K_CONTENT/⇣* :⇡/⇣⇡}// }//:/ }'
153153+154154+ # Grey current time.
155155+ typeset -g POWERLEVEL9K_TIME_FOREGROUND=$grey
156156+ # Format for the current time: 09:51:02. See `man 3 strftime`.
157157+ typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}'
158158+ # If set to true, time will update when you hit enter. This way prompts for the past
159159+ # commands will contain the start times of their commands rather than the end times of
160160+ # their preceding commands.
161161+ typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
162162+163163+ # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt
164164+ # when accepting a command line. Supported values:
165165+ #
166166+ # - off: Don't change prompt when accepting a command line.
167167+ # - always: Trim down prompt when accepting a command line.
168168+ # - same-dir: Trim down prompt when accepting a command line unless this is the first command
169169+ # typed after changing current working directory.
170170+ typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always
171171+172172+ # Instant prompt mode.
173173+ #
174174+ # - off: Disable instant prompt. Choose this if you've tried instant prompt and found
175175+ # it incompatible with your zsh configuration files.
176176+ # - quiet: Enable instant prompt and don't print warnings when detecting console output
177177+ # during zsh initialization. Choose this if you've read and understood
178178+ # https://github.com/romkatv/powerlevel10k#instant-prompt.
179179+ # - verbose: Enable instant prompt and print a warning when detecting console output during
180180+ # zsh initialization. Choose this if you've never tried instant prompt, haven't
181181+ # seen the warning, or if you are unsure what this all means.
182182+ typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
183183+184184+ # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
185185+ # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
186186+ # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you
187187+ # really need it.
188188+ typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
189189+190190+ # If p10k is already loaded, reload configuration.
191191+ # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
192192+ (( ! $+functions[p10k] )) || p10k reload
193193+}
194194+195195+# Tell `p10k configure` which file it should overwrite.
196196+typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}
197197+198198+(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
199199+'builtin' 'unset' 'p10k_config_opts'
+2
rc/.yarnrc
···11+# Yarn configuration
22+# lastUpdateCheck is managed by yarn itself