From 217ddc80d29907d9fedee0e39c6781ce19e89bbe Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:10:47 -0400 Subject: [PATCH 01/27] feat: migrate to Nix + Home Manager with restructured stow - Add flake.nix with NixOS and home-manager configuration - Add linux/home.nix for Debian/RPi package management - Move NixOS config to hosts/nixos/ - Restructure stow into common/, macos/, linux/, pi/ directories - Add Linux-specific zsh config in stow/linux/zsh/ - Update stow-dotfiles.sh for new directory structure - Update .gitignore and .stow-local-ignore for new structure --- .gitignore | 149 ++++++++++----- .stow-local-ignore | 78 ++++++-- flake.nix | 44 +++++ hosts/nixos/configuration.nix | 144 ++++++++++++++ linux/home.nix | 85 +++++++++ stow-dotfiles.sh | 83 ++++---- stow/common/bash/.bash_aliases | 77 ++++++++ stow/common/bash/.bash_login | 24 +++ stow/common/bash/.bash_profile | 14 ++ stow/common/bash/.bashrc | 102 ++++++++++ stow/common/bash/.inputrc | 15 ++ stow/common/git/.gitconfig | 55 ++++++ stow/common/git/.gitignore_global | 28 +++ stow/common/vim/.vimrc | 10 + stow/common/zsh/.osx_aliasrc | 116 ++++++++++++ stow/common/zsh/.zshenv | 8 + stow/common/zsh/.zshrc | 128 +++++++++++++ stow/linux/zsh/.zshrc | 23 +++ stow/macos/act/.actrc | 3 + .../iterm2/.iterm2_shell_integration.zsh | 178 ++++++++++++++++++ stow/macos/zprofile/.zprofile | 29 +++ stow/macos/zprofile/.zprofile.pysave | 2 + stow/macos/zsh/.osx_aliasrc | 116 ++++++++++++ stow/macos/zsh/.zshenv | 8 + stow/macos/zsh/.zshrc | 127 +++++++++++++ 25 files changed, 1534 insertions(+), 112 deletions(-) create mode 100644 flake.nix create mode 100644 hosts/nixos/configuration.nix create mode 100644 linux/home.nix create mode 100755 stow/common/bash/.bash_aliases create mode 100755 stow/common/bash/.bash_login create mode 100644 stow/common/bash/.bash_profile create mode 100644 stow/common/bash/.bashrc create mode 100644 stow/common/bash/.inputrc create mode 100644 stow/common/git/.gitconfig create mode 100644 stow/common/git/.gitignore_global create mode 100644 stow/common/vim/.vimrc create mode 100644 stow/common/zsh/.osx_aliasrc create mode 100644 stow/common/zsh/.zshenv create mode 100644 stow/common/zsh/.zshrc create mode 100644 stow/linux/zsh/.zshrc create mode 100644 stow/macos/act/.actrc create mode 100644 stow/macos/iterm2/.iterm2_shell_integration.zsh create mode 100644 stow/macos/zprofile/.zprofile create mode 100644 stow/macos/zprofile/.zprofile.pysave create mode 100644 stow/macos/zsh/.osx_aliasrc create mode 100644 stow/macos/zsh/.zshenv create mode 100644 stow/macos/zsh/.zshrc diff --git a/.gitignore b/.gitignore index f04a709..af62465 100644 --- a/.gitignore +++ b/.gitignore @@ -1,56 +1,121 @@ +# ===================================================================== +# OS/Editor Generated Files +# ===================================================================== .DS_Store \.DS_Store -node_modules/** -Makefile +.DS_Store? +._* +.Spotlight-V100 +.Trashes +Thumbs.db +ehthumbs.db +Desktop.ini + +# ===================================================================== +# Secrets & Credentials +# ===================================================================== *.pem *.key *.pub id_rsa* -cache/** -extensions/** -**/extensions/** +*id_ed25519* +*id_rsa +.env +.env.* +.env.secret +.env.local +.env.d.ts +oauth_creds.json +htpasswd +verdaccio/htpasswd +known_hosts* + +# ===================================================================== +# Build & Dependency Outputs +# ===================================================================== +node_modules/** +vendor/** +target/** +dist/** +build/** +*.o +*.so +*.a +*.lib +**/.docker/cli-plugins/** +# ===================================================================== +# Temporary Files +# ===================================================================== tmp/** -**/tmp/** temp/** .zsh_history -cache/** -.vscode/** -.netrwhist .zsh_sessions/** +cache/** (.config|config)/**/(temp|tmp)/** -.config/configstore/** -verdaccio/htpasswd -.config/yarn/** -.*history -known_hosts* -(.gemini|gemini)/oauth_creds.json -(.gemini|gemini)/tmp/** -htpasswd -oauth_creds.json +*.bak* +*~ +*.swp +*.swo +*# + +# ===================================================================== +# Development Tools +# ===================================================================== +.devbox/ +devbox.d/ +.vscode/** *.vscode -.devbox -devbox.d -docker/.docker/** -!docker/.docker/config.json -!docker/.docker/daemon.json -.env* -.env.d.ts -.env.secret -cursor/.cursor/* -.cursor/* -orbstack/.orbstack/* -.yarnrc -./npm/.npmrc -.npmrc* -test/bats.diff* +.idea/ +*.iml +Makefile + +# ===================================================================== +# Test & Coverage +# ===================================================================== tests/**/bats.log -argv.json -bats.diff +test/** tests/bats.diff* -test/**/bats.diff* -zsh/custom/plugins/** -*id_ed25519* -*id_rsa -*.bak* -goose/**/*/githubcopilot/** -ollama/**/* +test/bats.diff* + +# ===================================================================== +# Package Managers +# ===================================================================== +.npmrc* +.yarnrc +./npm/.npmrc +yarn-error.log + +# ===================================================================== +# Nix (keep flake.nix and *.nix configs, but not results) +# ===================================================================== +result +result-* +*.lock + +# ===================================================================== +# Stow temporary +# ===================================================================== +.stow* +.stow-local-ignore + +# ===================================================================== +# Stow Package-Specific Ignores +# ===================================================================== +# Cursor (macOS) - cache directories +stow/macos/cursor/.cursor/plugins/cache/** +stow/macos/cursor/.cursor/argv.json +stow/macos/cursor/.cursor/(projects|plans|plugins|rules|skills-cursor)/** +# 1Password (if contains sensitive data) +stow/common/1Password/.op/ +stow/common/1Password/config** + +# Orbstack (macOS) +orbstack/.orbstack/* + +# Gemini +.gemini/** +gemini/** + +# Ollama +ollama/** +stow/macos/cursor/.cursor/ diff --git a/.stow-local-ignore b/.stow-local-ignore index 7b6d934..36d0c62 100644 --- a/.stow-local-ignore +++ b/.stow-local-ignore @@ -1,25 +1,65 @@ -Makefile -/node_modules/ -\.DS_Store -.DS_Store +# ===================================================================== +# General Ignores (don't stow these) +# ===================================================================== .git .gitignore -.vscode -\.git -\.gitignore README.* LICENSE .env -test/* -devbox.* -package.* -README.md -.cursor/* -.claude/* -scripts/* -setup/* -test/* -bats -husky -nix/ +.env.* *.lock + +# Build outputs +node_modules/ +target/ +dist/ +build/ +vendor/ + +# IDE/Editor +.vscode/ +.idea/ +*.vscode + +# Test files +test/ +tests/ +bats/ + +# Scripts (run separately, not stowed) +scripts/ +setup*.sh +*.md + +# ===================================================================== +# Stow Directory-Specific +# ===================================================================== +# Nix/Flake files (managed separately) +flake.nix +hosts/ +linux/ +nix/ + +# Package managers +package.json +package-lock.json +pnpm-lock.yaml +yarn.lock + +# Dev tools +.devbox/ +devbox.d/ +.devbox + +# Temporary/Cache +cache/ +tmp/ +temp/ +*.swp +*.swo +*~ + +# macOS-specific cache +.DS_Store +.Spotlight-V100 +.Trashes diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e88aa0b --- /dev/null +++ b/flake.nix @@ -0,0 +1,44 @@ +# flake.nix - Main entry point for NixOS + home-manager +{ + description = "Dotfiles with Nix and Home Manager"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, home-manager, ... }: + let + systems = { + linux = "x86_64-linux"; + pi = "aarch64-linux"; + }; + in + { + # Home-manager standalone (Debian, RPi, macOS) + homeConfigurations = { + linux = home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs { system = systems.linux; }; + modules = [ ./linux/home.nix ]; + }; + + pi = home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs { system = systems.pi; }; + modules = [ ./linux/home.nix ]; + }; + }; + + # NixOS configuration (system + home-manager integrated) + nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/nixos/configuration.nix + home-manager.nixosModules.home-manager + { home-manager.users.jenc = import ./linux/home.nix; } + ]; + }; + }; +} diff --git a/hosts/nixos/configuration.nix b/hosts/nixos/configuration.nix new file mode 100644 index 0000000..6ff7a51 --- /dev/null +++ b/hosts/nixos/configuration.nix @@ -0,0 +1,144 @@ +# Global system config +# Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running β€˜nixos-help’). + +{ config, pkgs, ... }: + +{ +imports = [ + # Include the results of the hardware scan. + # ./hardware-configuration.nix + (fetchTarball "https://github.com/nix-community/nixos-vscode-server/tarball/master") +]; + + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "America/Toronto"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_CA.UTF-8"; + +users.users.jenc = { + isNormalUser = true; + description = "jenc"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; []; +}; + + programs.neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + configure = { + customRC = '' + let mapleader = "\" + lua << EOF + ${builtins.readFile /home/jenc/.config/nvim/init.lua} + + ${builtins.readFile /home/jenc/.config/nvim/lua/config/lazy.lua} + + ${builtins.readFile /home/jenc/.config/nvim/lua/config/keymaps.lua} + + ${builtins.readFile /home/jenc/.config/nvim/lua/config/autocmds.lua} + EOF + + ''; + }; + }; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + system.userActivationScripts.zshrc = "touch .zshrc"; # to avoid being prompted to generate the config for first time + + programs.direnv.enable = true; + + # Enable Zsh with Oh My Zsh + programs.zsh = { + enable = true; + ohMyZsh = { + enable = true; + plugins = [ "git" "zsh-autosuggestions" "zsh-autocomplete" "1password" "gh" "direnv" ]; + theme = "robbyrussell"; + }; + }; + + + # Enable automatic login for the user. + services.getty.autologinUser = "jenc"; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + wget + direnv + gitFull + nixfmt-rfc-style + starship + vim + neovim + zsh + oh-my-zsh + tree + fzf + vimPlugins.nvim-cmp + vimPlugins.LazyVim +]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + + services.vscode-server = { + enable = true; + installPath = "/home/jenc/.cursor-server"; + }; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. Itβ€˜s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "24.11"; + # automatic garbage collection + nix.gc.automatic = true; + # Run daily at 3:15 AM + nix.gc.dates = "03:15"; +} diff --git a/linux/home.nix b/linux/home.nix new file mode 100644 index 0000000..8fc623f --- /dev/null +++ b/linux/home.nix @@ -0,0 +1,85 @@ +/Users/jenc/.dotfiles/linux/home.nix +``` + +```nix +# linux/home.nix - Home Manager configuration for Linux (Debian/RPi) +{ config, pkgs, lib, ... }: + +{ + # ===================================================================== + # BASE PACKAGES - CLI tools and development libraries + # ===================================================================== + home.packages = with pkgs; [ + # Version control + git + + # HTTP clients + curl + wget + + # Essential build tools + build-essential + openssl + libyaml-dev + libgmp-dev + ca-certificates + gnupg + + # Utilities + stow + tree + unzip + lsb-release + + # System monitoring + htop + + # Editors + vim + neovim + ]; + + # ===================================================================== + # SPECIAL PACKAGES - Tools that need custom installation + # Note: These are typically installed via other means: + # - nvm: via script (https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh) + # - pnpm: via npm install -g pnpm + # - direnv: can be installed via nix or binary release + # - tailscale: via official script + # ===================================================================== + + # Install direnv via nix (available in pkgs) + direnv + + # ===================================================================== + # ENVIRONMENT VARIABLES + # ===================================================================== + home.sessionVariables = { + EDITOR = "nvim"; + VISUAL = "nvim"; + }; + + # ===================================================================== + # SHELL CONFIGURATION + # ===================================================================== + + # Enable zsh via home-manager (optional - can also use stow) + # programs.zsh.enable = true; + + # Enable bash via home-manager (optional) + # programs.bash.enable = true; + + # ===================================================================== + # NOTES + # ===================================================================== + # + # Package notes: + # - Most apt packages are available in nixpkgs + # - Some packages may need special handling (docker, tailscale, etc.) + # - For Pi-specific: use lib.optionals pkgs.hostPlatform.isAarch64 + # + # To add conditional packages: + # home.packages = (home.packages or []) ++ (with pkgs; lib.optionals pkgs.hostPlatform.isAarch64 [ + # # Pi-specific packages here + # ]); +} diff --git a/stow-dotfiles.sh b/stow-dotfiles.sh index 34e0547..1fa3814 100755 --- a/stow-dotfiles.sh +++ b/stow-dotfiles.sh @@ -1,15 +1,18 @@ #!/bin/bash -# OS-aware stow script - only stows relevant dotfiles based on OS +# OS-aware stow script - stows relevant dotfiles based on OS +# Uses new directory structure: stow/common/, stow/macos/, stow/linux/, stow/pi/ set -e -# Get script directory (works with bash) +# Get script directory SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)" cd "$SCRIPT_DIR" +# Detect OS OS=$(uname -s) +ARCH=$(uname -m) -# Detect NixOS specifically (not just any Linux) +# Detect NixOS specifically IS_NIXOS=false if [[ "$OS" == "Linux" ]]; then if [[ -f /etc/os-release ]]; then @@ -22,6 +25,22 @@ if [[ "$OS" == "Linux" ]]; then fi fi +# Detect Raspberry Pi (ARM64) +IS_PI=false +if [[ "$ARCH" == "aarch64" ]] || [[ "$ARCH" == "arm64" ]]; then + IS_PI=true +fi + +# Determine which OS-specific directory to use +STOW_OS="" +if [[ "$OS" == "Darwin" ]]; then + STOW_OS="macos" +elif [[ "$IS_PI" == "true" ]]; then + STOW_OS="pi" +elif [[ "$OS" == "Linux" ]]; then + STOW_OS="linux" +fi + # Allow passing stow flags (defaults to --adopt if no arguments provided) # Pass empty string "" to skip --adopt flag if [[ $# -eq 0 ]]; then @@ -32,45 +51,14 @@ else STOW_FLAGS="$1" fi -# Common packages (work on both macOS and Linux) -COMMON=( - bash - nvim - git - direnv - ssh - docker - gh - op - npm - vim - 1Password -) - -# macOS-specific packages -MACOS_PACKAGES=( - act - iterm2 - orbstack - cursor - oh-my-zsh - zsh - zprofile - yarn - nvm - verdaccio - husky -) - -# Note: nix/ folder is not stowed automatically -# It should be managed manually or via NixOS configuration.nix - # Function to stow a package if it exists and is not empty stow_package() { local pkg="$1" - if [[ -d "$pkg" ]] && [[ -n "$(ls -A "$pkg" 2>/dev/null)" ]]; then + local dir="stow/$pkg" + + if [[ -d "$dir" ]] && [[ -n "$(ls -A "$dir" 2>/dev/null)" ]]; then echo "πŸ“¦ Stowing $pkg..." - if stow $STOW_FLAGS "$pkg" 2>/dev/null; then + if stow $STOW_FLAGS -d stow -t "$HOME" "$pkg" 2>/dev/null; then echo " βœ… $pkg stowed successfully" else echo " ⚠️ Warning: Could not stow $pkg (may already be stowed or have conflicts)" @@ -81,27 +69,20 @@ stow_package() { } # Main execution -echo "πŸ”— Setting up dotfiles for $(uname -s)..." +echo "πŸ”— Setting up dotfiles for $OS..." echo "" -# Stow common packages +# Stow common packages (work on all OSes) echo "πŸ“¦ Stowing common packages..." -for pkg in "${COMMON[@]}"; do - stow_package "$pkg" -done +stow_package "common" # Stow OS-specific packages -if [[ "$OS" == "Darwin" ]]; then +if [[ -n "$STOW_OS" ]]; then echo "" - echo "🍎 Stowing macOS-specific packages..." - for pkg in "${MACOS_PACKAGES[@]}"; do - stow_package "$pkg" - fi + echo "πŸ“¦ Stowing $STOW_OS-specific packages..." + stow_package "$STOW_OS" fi -# Note: nix/ folder is not stowed automatically -# It should be managed manually or via NixOS configuration.nix - echo "" echo "βœ… Dotfiles setup complete!" echo "" diff --git a/stow/common/bash/.bash_aliases b/stow/common/bash/.bash_aliases new file mode 100755 index 0000000..f9a114e --- /dev/null +++ b/stow/common/bash/.bash_aliases @@ -0,0 +1,77 @@ +# Functions +mkcd() { + mkdir -p "$1" && cd "$1" +} + +extract() { + if [ -f $1 ]; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar e $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via extract()" ;; + esac + else + echo "'$1' is not a valid file" + fi +} +# check if bash is the current shell +if [$SHELL === '/bin/bash']; then + alias reload='source ~/.bashrc' +fi + +alias update='sudo apt update && sudo apt upgrade' +alias install='sudo apt install' +alias remove='sudo apt remove' +alias autoremove='sudo apt autoremove' +alias search='apt search' +alias py='python3' +alias pip='pip3' + +# Improved directory listing +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' + +# git +alias g='git' + +# gh cli +alias copilot='gh copilot' +alias gcs='gh copilot suggest' +alias gce='gh copilot explain' + +# editors/code assistants +alias cc='claude code' +alias vi='/opt/nvim/bin/nvim' +alias nvim='/opt/nvim/bin/nvim' +alias sudov='sudo -e' +# soft shutdown/restart +alias xoff='sudo /usr/local/bin/xSoft.sh 0 27' +alias docker-compose='docker compose' +# kubernetes +alias k='kubectl' + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + alias dir='dir --color=auto' + alias grep='grep --color=auto' +fi + +cd() { + builtin cd "$@" || return + + if [ "$PWD" = "$HOME" ] || [[ $PWD == "$HOME"/* ]]; then + ls -AClht --color=auto --group-directories-first --time-style=full-iso + fi +} diff --git a/stow/common/bash/.bash_login b/stow/common/bash/.bash_login new file mode 100755 index 0000000..ce61e85 --- /dev/null +++ b/stow/common/bash/.bash_login @@ -0,0 +1,24 @@ +#!/bin/bash +kernel=$(uname -r) +uptime=$(uptime -p) + +# Get IPs with interface labels +hostname=$(uname -n) +ip=$(ip -o addr show | awk '!/127.0.0.1|::1|fe80::/ {gsub(/\/.*/, "", $4); print $2": "$4}') +total_memory=$(awk '/^MemTotal:/ {print int($2/1024)}' /proc/meminfo) +free_memory=$(awk '/^MemAvailable:/ {print int($2/1024)}' /proc/meminfo) +used_memory=$((total_memory - free_memory)) + +if ((total_memory > 0)); then + memory_usage_percent=$((used_memory * 100 / total_memory)) +else + memory_usage_percent=0 +fi + +cowsay -f dragon "${hostname}@${ip}" | lolcat + +echo -e "Operating System:\t$(lsb_release -ds) ($(uname -o))" +echo -e "Processor:\t\t$(lscpu | awk -F ':' '/Model name/ {gsub(/^[ \t]+/, "", $2); print $2}')" +echo -e "Kernel:\t\t\t${kernel}" +echo -e "Uptime:\t\t\t${uptime}" +echo -e "Memory Usage:\t\tUsed ${used_memory} MB of ${total_memory} MB (${memory_usage_percent} %) ${free_memory} MB available " diff --git a/stow/common/bash/.bash_profile b/stow/common/bash/.bash_profile new file mode 100644 index 0000000..b3d954f --- /dev/null +++ b/stow/common/bash/.bash_profile @@ -0,0 +1,14 @@ +# In bash/.bash_profile +# Get the aliases and functions +if [ -f ~/.bashrc ]; then + . ~/.bashrc + . ~/.bash_login +fi + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# Set up fzf key bindings and fuzzy completion +eval "$(fzf --bash)" +eval "$(devbox global shellenv --init-hook)" +eval "$(direnv hook bash)" diff --git a/stow/common/bash/.bashrc b/stow/common/bash/.bashrc new file mode 100644 index 0000000..5da84bb --- /dev/null +++ b/stow/common/bash/.bashrc @@ -0,0 +1,102 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in +*i*) ;; +*) return ;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in +xterm-color | *-256color) color_prompt=yes ;; +esac + +force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm* | rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) ;; +esac + +# colored GCC warnings and errors +export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + source ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +export PATH="$HOME/.local/bin:$PATH" + +# move nvim into /opt/ for debian +export PATH="/opt/nvim/bin:$PATH" +alias xoff='sudo /usr/local/bin/xSoft.sh 0 27' + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/stow/common/bash/.inputrc b/stow/common/bash/.inputrc new file mode 100644 index 0000000..924ce6a --- /dev/null +++ b/stow/common/bash/.inputrc @@ -0,0 +1,15 @@ +# allow the command prompt to wrap to the next line +set horizontal-scroll-mode On + +# none, visible or audible +set bell-style visible + +# Make Tab autocomplete regardless of filename case +set completion-ignore-case on + +## ------- Keybindings ----- ## + +# Left Arrow (or Ctrl+Left Arrow) +"\eOd": backward-word +# Right Arrow (or Ctrl+Right Arrow +"\eOc": forward-word \ No newline at end of file diff --git a/stow/common/git/.gitconfig b/stow/common/git/.gitconfig new file mode 100644 index 0000000..c31c81b --- /dev/null +++ b/stow/common/git/.gitconfig @@ -0,0 +1,55 @@ +[user] + username=usrrname + name = Jen Chan + email = 6406037+usrrname@users.noreply.github.com + signingkey = ~/.ssh/id_ed25519.pub +[color] + ui = auto + +[core] + editor = nvim + excludesFile = ~/.gitignore_global + +[gpg] + format = ssh + +[gpg "ssh"] + program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign" + +[commit] + gpgsign = true + +[push] + autoSetupRemote = true + +[init] + defaultBranch = main + +[pull] + rebase = true + +[alias] + g = git + gco = checkout + gst = status + gcb = checkout -b + gcm = commit -m + noedit = commit --amend --no-edit + + # log all commits + log = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate + + # prevent git from tracking any changes to a file + assume = "update-index --assume-unchanged" + + # show all files that have been marked assume-unchanged + assumed = "!git ls-files -v | grep ^h | cut -c 3-" + + # restore git trackable + unassume = "update-index --no-assume-unchanged" + + # unassume all the assumed files + unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged" + + # list all aliases + alias = "!git config -l | grep alias | cut -c 7-" diff --git a/stow/common/git/.gitignore_global b/stow/common/git/.gitignore_global new file mode 100644 index 0000000..e4b3a27 --- /dev/null +++ b/stow/common/git/.gitignore_global @@ -0,0 +1,28 @@ +# Direnv files +.direnv +.envrc + +# macOS specific files and folders +.DS_Store + +# Temporary files +tmp/** +.zcompdump-* + +# Editor specific files and folders +.idea +.vscode +.cursorrules +.cursor +.goosehint + +# Environment variables +!.env.schema +.env* +.envrc +id_* +id_ed25519* +id_rsa* +.pem* +.cert* +.crt* diff --git a/stow/common/vim/.vimrc b/stow/common/vim/.vimrc new file mode 100644 index 0000000..462a04f --- /dev/null +++ b/stow/common/vim/.vimrc @@ -0,0 +1,10 @@ +# enable modern features +set nocompatible + +# arrow keys should work in insert mode +inoremap k +inoremap j +inoremap h +inoremap l +# map command s to save file +imap :wa diff --git a/stow/common/zsh/.osx_aliasrc b/stow/common/zsh/.osx_aliasrc new file mode 100644 index 0000000..e62418d --- /dev/null +++ b/stow/common/zsh/.osx_aliasrc @@ -0,0 +1,116 @@ +## OSX aliases +# python +alias python='python3' +alias pip='pip3' + +# git +alias g='git' + +# Make files untracked by git +# example: assume +alias assume='git update-index --assume-unchanged' + +# example: unassume +alias unassume='git update-index --no-assume-unchanged' +alias reload='source ~/.zshrc' + +# editors/code assistants +alias vi='nvim' +alias cursor='/Applications/Cursor.app/Contents/Resources/app/bin/cursor' +# Ollama aliases +alias ol='ollama' +alias olcode='ollama run codellama:7b' +alias 'ol ls'='ollama list' +alias 'ol upgrade'='brew upgrade ollama' + +# databases +alias mysql='/opt/homebrew/bin/mysql' +alias mysqladmin='/opt/homebrew/bin/mysqladmin' + +# ssh +# If you need a username, use: alias thingymachine='ssh user@68.183.204.78' +alias thingymachine='ssh 68.183.204.78' +alias expose='../script/expose.sh' + +# shell aliases +alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app' +alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app' + +alias zshconfig='mate ~/.zshrc' + +# brew +alias brewup='brew update; brew upgrade; brew prune; brew cleanup; brew doctor' + +# package management +# pnpm +alias p='pnpm' + +# php / Laravel +alias composer='php /usr/local/bin/composer.phar' +alias sail='[ -f sail ] && zsh sail || zsh vendor/bin/sail' +alias pint='./vendor/bin/pint' + +# nektos/act +alias act='act --container-architecture linux/amd64' + +# kubernetes +alias k='kubectl' + +# Functions for common tasks + +## Ollama functions + +# Example: ask 'What is the capital of France?' +function ask() { + printf '%s\n' "$1" | ollama run llama3.2 +} + +# Example: review +function review() { + cat "$1" | ollama run codellama 'Review this code for bugs and improvements:' +} + +# Example: translate 'Hello' 'French' +function translate() { + printf '%s\n' "$1" | ollama run llama3.2 "Translate to $2:" +} + +# Model management +# olshow +# Example: olshow 'llama3.2' +function olshow() { + ollama show "$1" +} + +function model_size() { + du -sh ~/.ollama/models/* 2>/dev/null || echo "No models found at ~/.ollama/models" +} + +# nvm / node +# Define as a function so $NVM_DIR expands correctly +get-nvm() { + if [ -n "$NVM_DIR" ]; then + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" + else + echo "NVM_DIR is not set" + fi +} + +# OS X specific aliases +# delete .DS_Store files from a directory path +# usage: delete_ds +delete_ds(){ + # list files to be deleted + echo -e "This will delete all .DS_Store files from $1 and its subdirectories.\n" + find "$1" -name '.DS_Store' -print + echo 'Are you sure? (y/n)' + read -r answer + if [[ $answer != y ]]; then + echo 'Aborting.' + return + else + echo "Deleting .DS_Store files from $1..." + find "$1" -name '.DS_Store' -delete -print + fi +} diff --git a/stow/common/zsh/.zshenv b/stow/common/zsh/.zshenv new file mode 100644 index 0000000..c2fdbbe --- /dev/null +++ b/stow/common/zsh/.zshenv @@ -0,0 +1,8 @@ +. "$HOME/.cargo/env" + +# don't create .DS_Store files on network volumes +defaults write com.apple.desktopservices DSDontWriteNetworkStores true +# don't create .DS_Store files on USB volumes +defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true +# show hidden files in Finder by default +defaults write com.apple.finder AppleShowAllFiles YES diff --git a/stow/common/zsh/.zshrc b/stow/common/zsh/.zshrc new file mode 100644 index 0000000..19fa71c --- /dev/null +++ b/stow/common/zsh/.zshrc @@ -0,0 +1,128 @@ +# OPENSPEC:START +# OpenSpec shell completions configuration +fpath=("/Users/jenc/.oh-my-zsh/custom/completions" $fpath) +autoload -Uz compinit +compinit +# OPENSPEC:END + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# ---- theme ---- +export PROMPT='~🧻 ' +export ZSH_THEME="robbyrussell" + +# Uncomment the following line to change how often to auto-update (in days). +zstyle ':omz:update' frequency 13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +DISABLE_UNTRACKED_FILES_DIRTY="true" + +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +HIST_STAMPS="yyyy-mm-dd" + +# ---- Plugins ---- +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +plugins=(git 1password gh zsh-autosuggestions zsh-autocomplete direnv) + +# Set ZSH path before sourcing oh-my-zsh +# ZSH must point to the oh-my-zsh installation directory +export ZSH="$HOME/.oh-my-zsh" + +# ZSH_CUSTOM points to custom plugins/aliases (managed via stow) +export ZSH_CUSTOM="$HOME/.oh-my-zsh/custom" +# Load oh-my-zsh +source "$ZSH/oh-my-zsh.sh" +export NVM_DIR="$HOME/.nvm" + +# ---- User configuration -------- + +# Preferred editor for local and remote sessions + if [[ -n $SSH_CONNECTION ]]; then + echo "πŸ”’ SSH connection detected" + else + export EDITOR='nvim' + fi + +# ------- aliases -------- +# Overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. + + +# use iterm2 on zsh init +source ~/.iterm2_shell_integration.zsh + +# mysql +export PKG_CONFIG_PATH="/usr/local/opt/mysql-client/lib/pkgconfig" +export PATH="/usr/local/opt/mysql-client/bin:$PATH" +# Docker CLI completions. +fpath=(/Users/jenc/.docker/completions $fpath) + +# SSH agent socket for 1Password integration +export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock + +# devbox called only when `devbox` is typed +devbox() { + unfunction devbox + eval "$(command devbox global shellenv --preserve-path-stack -r)" + command devbox "$@" +} + +# Only start ssh-agent if not already running +if [ -z "$SSH_AUTH_SOCK" ]; then + eval "$(ssh-agent -s)" > /dev/null +fi + +# Add SSH key to agent with macOS keychain support +# This will prompt for passphrase once, then store it in macOS keychain +# Check if key is already in agent to avoid repeated prompts +if ! ssh-add -l 2>/dev/null | grep -q "id_ed25519"; then + ssh-add --apple-use-keychain ~/.ssh/id_ed25519 2>/dev/null || true + ssh-add --apple-use-keychain ~/.ssh/id_rsa 2>/dev/null || true +fi + +# pnpm +export PNPM_HOME="/Users/jenc/Library/pnpm" +case ":$PATH:" in + *":$PNPM_HOME:"*) ;; + *) export PATH="$PNPM_HOME:$PATH" ;; +esac +# pnpm end +# uv +eval "$(uv generate-shell-completion zsh)" +export PATH="$HOME/.local/bin:$PATH" +# ------------ Paths ------------ + +# mysql if using mysql +if [[ -f /opt/homebrew/opt/mysql/bin/mysql ]]; then + export PATH="/opt/homebrew/opt/mysql/bin:$PATH" + export PATH="/opt/homebrew/opt/mysql@8.0/bin:$PATH" + export PATH="/opt/homebrew/opt/mysql@8.4/bin:$PATH" + export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH" +fi +# add homebrew sbin to path +export PATH="/opt/homebrew/sbin:$PATH" + +# Load fnm (Fast Node Manager) +eval "$(fnm env --use-on-cd)" + +# load aliases +source ~/.osx_aliasrc +# opencode +export PATH=/Users/jenc/.opencode/bin:$PATH diff --git a/stow/linux/zsh/.zshrc b/stow/linux/zsh/.zshrc new file mode 100644 index 0000000..6db3371 --- /dev/null +++ b/stow/linux/zsh/.zshrc @@ -0,0 +1,23 @@ +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# ---- Basic Configuration ---- +export EDITOR="nvim" +export VISUAL="$EDITOR" + +# ---- Theme ---- +export ZSH="$HOME/.oh-my-zsh" +ZSH_THEME="robbyrussell" + +# ---- Plugins ---- +plugins=(git direnv zsh-autosuggestions zsh-autocomplete) + +# ---- Load oh-my-zsh ---- +source "$ZSH/oh-my-zsh.sh" + +# ---- User Configuration ---- +export PATH="$HOME/.local/bin:$PATH" + +# ---- Linux-specific aliases ---- +alias ll='ls -la' +alias la='ls -a' diff --git a/stow/macos/act/.actrc b/stow/macos/act/.actrc new file mode 100644 index 0000000..ecfef1f --- /dev/null +++ b/stow/macos/act/.actrc @@ -0,0 +1,3 @@ +-P ubuntu-latest=node:16-buster-slim +-P ubuntu-20.04=node:16-buster-slim +-P ubuntu-18.04=node:16-buster-slim diff --git a/stow/macos/iterm2/.iterm2_shell_integration.zsh b/stow/macos/iterm2/.iterm2_shell_integration.zsh new file mode 100644 index 0000000..7871ddd --- /dev/null +++ b/stow/macos/iterm2/.iterm2_shell_integration.zsh @@ -0,0 +1,178 @@ +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +if [[ -o interactive ]]; then + if [ "${ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX-}""$TERM" != "tmux-256color" -a "${ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX-}""$TERM" != "screen" -a "${ITERM_SHELL_INTEGRATION_INSTALLED-}" = "" -a "$TERM" != linux -a "$TERM" != dumb ]; then + ITERM_SHELL_INTEGRATION_INSTALLED=Yes + ITERM2_SHOULD_DECORATE_PROMPT="1" + # Indicates start of command output. Runs just before command executes. + iterm2_before_cmd_executes() { + if [ "$TERM_PROGRAM" = "iTerm.app" ]; then + printf "\033]133;C;\r\007" + else + printf "\033]133;C;\007" + fi + } + + iterm2_set_user_var() { + printf "\033]1337;SetUserVar=%s=%s\007" "$1" $(printf "%s" "$2" | base64 | tr -d '\n') + } + + # Users can write their own version of this method. It should call + # iterm2_set_user_var but not produce any other output. + # e.g., iterm2_set_user_var currentDirectory $PWD + # Accessible in iTerm2 (in a badge now, elsewhere in the future) as + # \(user.currentDirectory). + whence -v iterm2_print_user_vars > /dev/null 2>&1 + if [ $? -ne 0 ]; then + iterm2_print_user_vars() { + true + } + fi + + iterm2_print_state_data() { + local _iterm2_hostname="${iterm2_hostname-}" + if [ -z "${iterm2_hostname:-}" ]; then + _iterm2_hostname=$(hostname -f 2>/dev/null) + fi + printf "\033]1337;RemoteHost=%s@%s\007" "$USER" "${_iterm2_hostname-}" + printf "\033]1337;CurrentDir=%s\007" "$PWD" + iterm2_print_user_vars + } + + # Report return code of command; runs after command finishes but before prompt + iterm2_after_cmd_executes() { + printf "\033]133;D;%s\007" "$STATUS" + iterm2_print_state_data + } + + # Mark start of prompt + iterm2_prompt_mark() { + printf "\033]133;A\007" + } + + # Mark end of prompt + iterm2_prompt_end() { + printf "\033]133;B\007" + } + + # There are three possible paths in life. + # + # 1) A command is entered at the prompt and you press return. + # The following steps happen: + # * iterm2_preexec is invoked + # * PS1 is set to ITERM2_PRECMD_PS1 + # * ITERM2_SHOULD_DECORATE_PROMPT is set to 1 + # * The command executes (possibly reading or modifying PS1) + # * iterm2_precmd is invoked + # * ITERM2_PRECMD_PS1 is set to PS1 (as modified by command execution) + # * PS1 gets our escape sequences added to it + # * zsh displays your prompt + # * You start entering a command + # + # 2) You press ^C while entering a command at the prompt. + # The following steps happen: + # * (iterm2_preexec is NOT invoked) + # * iterm2_precmd is invoked + # * iterm2_before_cmd_executes is called since we detected that iterm2_preexec was not run + # * (ITERM2_PRECMD_PS1 and PS1 are not messed with, since PS1 already has our escape + # sequences and ITERM2_PRECMD_PS1 already has PS1's original value) + # * zsh displays your prompt + # * You start entering a command + # + # 3) A new shell is born. + # * PS1 has some initial value, either zsh's default or a value set before this script is sourced. + # * iterm2_precmd is invoked + # * ITERM2_SHOULD_DECORATE_PROMPT is initialized to 1 + # * ITERM2_PRECMD_PS1 is set to the initial value of PS1 + # * PS1 gets our escape sequences added to it + # * Your prompt is shown and you may begin entering a command. + # + # Invariants: + # * ITERM2_SHOULD_DECORATE_PROMPT is 1 during and just after command execution, and "" while the prompt is + # shown and until you enter a command and press return. + # * PS1 does not have our escape sequences during command execution + # * After the command executes but before a new one begins, PS1 has escape sequences and + # ITERM2_PRECMD_PS1 has PS1's original value. + iterm2_decorate_prompt() { + # This should be a raw PS1 without iTerm2's stuff. It could be changed during command + # execution. + ITERM2_PRECMD_PS1="$PS1" + ITERM2_SHOULD_DECORATE_PROMPT="" + + # Add our escape sequences just before the prompt is shown. + # Use ITERM2_SQUELCH_MARK for people who can't mdoify PS1 directly, like powerlevel9k users. + # This is gross but I had a heck of a time writing a correct if statetment for zsh 5.0.2. + local PREFIX="" + if [[ $PS1 == *"$(iterm2_prompt_mark)"* ]]; then + PREFIX="" + elif [[ "${ITERM2_SQUELCH_MARK-}" != "" ]]; then + PREFIX="" + else + PREFIX="%{$(iterm2_prompt_mark)%}" + fi + PS1="$PREFIX$PS1%{$(iterm2_prompt_end)%}" + ITERM2_DECORATED_PS1="$PS1" + } + + iterm2_precmd() { + local STATUS="$?" + if [ -z "${ITERM2_SHOULD_DECORATE_PROMPT-}" ]; then + # You pressed ^C while entering a command (iterm2_preexec did not run) + iterm2_before_cmd_executes + if [ "$PS1" != "${ITERM2_DECORATED_PS1-}" ]; then + # PS1 changed, perhaps in another precmd. See issue 9938. + ITERM2_SHOULD_DECORATE_PROMPT="1" + fi + fi + + iterm2_after_cmd_executes "$STATUS" + + if [ -n "$ITERM2_SHOULD_DECORATE_PROMPT" ]; then + iterm2_decorate_prompt + fi + } + + # This is not run if you press ^C while entering a command. + iterm2_preexec() { + # Set PS1 back to its raw value prior to executing the command. + PS1="$ITERM2_PRECMD_PS1" + ITERM2_SHOULD_DECORATE_PROMPT="1" + iterm2_before_cmd_executes + } + + # If hostname -f is slow on your system set iterm2_hostname prior to + # sourcing this script. We know it is fast on macOS so we don't cache + # it. That lets us handle the hostname changing like when you attach + # to a VPN. + if [ -z "${iterm2_hostname-}" ]; then + if [ "$(uname)" != "Darwin" ]; then + iterm2_hostname=`hostname -f 2>/dev/null` + # Some flavors of BSD (i.e. NetBSD and OpenBSD) don't have the -f option. + if [ $? -ne 0 ]; then + iterm2_hostname=`hostname` + fi + fi + fi + + [[ -z ${precmd_functions-} ]] && precmd_functions=() + precmd_functions=($precmd_functions iterm2_precmd) + + [[ -z ${preexec_functions-} ]] && preexec_functions=() + preexec_functions=($preexec_functions iterm2_preexec) + + iterm2_print_state_data + printf "\033]1337;ShellIntegrationVersion=14;shell=zsh\007" + fi +fi diff --git a/stow/macos/zprofile/.zprofile b/stow/macos/zprofile/.zprofile new file mode 100644 index 0000000..91cb09c --- /dev/null +++ b/stow/macos/zprofile/.zprofile @@ -0,0 +1,29 @@ + +# Only run if command exists (faster) +[ -x /opt/homebrew/bin/brew ] && eval "$(/opt/homebrew/bin/brew shellenv)" +command -v direnv >/dev/null 2>&1 && eval "$(direnv hook zsh)" +command -v pyenv >/dev/null 2>&1 && eval "$(pyenv init -)" + +# Show all filename extensions in Finder +defaults write NSGlobalDomain AppleShowAllExtensions -bool true + +# Set screenshot location +defaults write com.apple.screencapture "location" -string "~/pictures/screenshots" + +# don't create .DS_Store files on network volumes +defaults write com.apple.desktopservices DSDontWriteNetworkStores true +# don't create .DS_Store files on USB volumes +defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true +# show hidden files in Finder by default +defaults write com.apple.finder AppleShowAllFiles YES + + +# Mise uses shims to load dev tools into the PATH +# https://mise.jdx.dev/dev-tools/shims.html#mise-activate-shims +eval "$(mise activate zsh --shims)" +# Added by OrbStack: command-line tools and integration +# This won't be added again if you remove it. +[ -f ~/.orbstack/shell/init.zsh ] && source ~/.orbstack/shell/init.zsh 2>/dev/null || : + +# Load secrets to use anywhere in the filesystem +source $HOME/.dotfiles/.env.secret diff --git a/stow/macos/zprofile/.zprofile.pysave b/stow/macos/zprofile/.zprofile.pysave new file mode 100644 index 0000000..f0193f7 --- /dev/null +++ b/stow/macos/zprofile/.zprofile.pysave @@ -0,0 +1,2 @@ +virtualenv venv --python=/usr/local/bin/python +export PATH diff --git a/stow/macos/zsh/.osx_aliasrc b/stow/macos/zsh/.osx_aliasrc new file mode 100644 index 0000000..e62418d --- /dev/null +++ b/stow/macos/zsh/.osx_aliasrc @@ -0,0 +1,116 @@ +## OSX aliases +# python +alias python='python3' +alias pip='pip3' + +# git +alias g='git' + +# Make files untracked by git +# example: assume +alias assume='git update-index --assume-unchanged' + +# example: unassume +alias unassume='git update-index --no-assume-unchanged' +alias reload='source ~/.zshrc' + +# editors/code assistants +alias vi='nvim' +alias cursor='/Applications/Cursor.app/Contents/Resources/app/bin/cursor' +# Ollama aliases +alias ol='ollama' +alias olcode='ollama run codellama:7b' +alias 'ol ls'='ollama list' +alias 'ol upgrade'='brew upgrade ollama' + +# databases +alias mysql='/opt/homebrew/bin/mysql' +alias mysqladmin='/opt/homebrew/bin/mysqladmin' + +# ssh +# If you need a username, use: alias thingymachine='ssh user@68.183.204.78' +alias thingymachine='ssh 68.183.204.78' +alias expose='../script/expose.sh' + +# shell aliases +alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app' +alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app' + +alias zshconfig='mate ~/.zshrc' + +# brew +alias brewup='brew update; brew upgrade; brew prune; brew cleanup; brew doctor' + +# package management +# pnpm +alias p='pnpm' + +# php / Laravel +alias composer='php /usr/local/bin/composer.phar' +alias sail='[ -f sail ] && zsh sail || zsh vendor/bin/sail' +alias pint='./vendor/bin/pint' + +# nektos/act +alias act='act --container-architecture linux/amd64' + +# kubernetes +alias k='kubectl' + +# Functions for common tasks + +## Ollama functions + +# Example: ask 'What is the capital of France?' +function ask() { + printf '%s\n' "$1" | ollama run llama3.2 +} + +# Example: review +function review() { + cat "$1" | ollama run codellama 'Review this code for bugs and improvements:' +} + +# Example: translate 'Hello' 'French' +function translate() { + printf '%s\n' "$1" | ollama run llama3.2 "Translate to $2:" +} + +# Model management +# olshow +# Example: olshow 'llama3.2' +function olshow() { + ollama show "$1" +} + +function model_size() { + du -sh ~/.ollama/models/* 2>/dev/null || echo "No models found at ~/.ollama/models" +} + +# nvm / node +# Define as a function so $NVM_DIR expands correctly +get-nvm() { + if [ -n "$NVM_DIR" ]; then + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" + else + echo "NVM_DIR is not set" + fi +} + +# OS X specific aliases +# delete .DS_Store files from a directory path +# usage: delete_ds +delete_ds(){ + # list files to be deleted + echo -e "This will delete all .DS_Store files from $1 and its subdirectories.\n" + find "$1" -name '.DS_Store' -print + echo 'Are you sure? (y/n)' + read -r answer + if [[ $answer != y ]]; then + echo 'Aborting.' + return + else + echo "Deleting .DS_Store files from $1..." + find "$1" -name '.DS_Store' -delete -print + fi +} diff --git a/stow/macos/zsh/.zshenv b/stow/macos/zsh/.zshenv new file mode 100644 index 0000000..c2fdbbe --- /dev/null +++ b/stow/macos/zsh/.zshenv @@ -0,0 +1,8 @@ +. "$HOME/.cargo/env" + +# don't create .DS_Store files on network volumes +defaults write com.apple.desktopservices DSDontWriteNetworkStores true +# don't create .DS_Store files on USB volumes +defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true +# show hidden files in Finder by default +defaults write com.apple.finder AppleShowAllFiles YES diff --git a/stow/macos/zsh/.zshrc b/stow/macos/zsh/.zshrc new file mode 100644 index 0000000..1ab18bf --- /dev/null +++ b/stow/macos/zsh/.zshrc @@ -0,0 +1,127 @@ +# add homebrew sbin to path +export PATH="/opt/homebrew/sbin:$PATH" +# OPENSPEC:START +# OpenSpec shell completions configuration +fpath=("/Users/jenc/.oh-my-zsh/custom/completions" $fpath) +autoload -Uz compinit +compinit +# OPENSPEC:END + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# ---- theme ---- +export PROMPT='~🧻 ' +export ZSH_THEME="robbyrussell" + +# Uncomment the following line to change how often to auto-update (in days). +zstyle ':omz:update' frequency 13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +DISABLE_UNTRACKED_FILES_DIRTY="true" + +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +HIST_STAMPS="yyyy-mm-dd" + +# ---- Plugins ---- +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +plugins=(git 1password gh zsh-autosuggestions zsh-autocomplete direnv) + +# Set ZSH path before sourcing oh-my-zsh +# ZSH must point to the oh-my-zsh installation directory +export ZSH="$HOME/.oh-my-zsh" + +# ZSH_CUSTOM points to custom plugins/aliases (managed via stow) +export ZSH_CUSTOM="$HOME/.oh-my-zsh/custom" +# Load oh-my-zsh +source "$ZSH/oh-my-zsh.sh" +export NVM_DIR="$HOME/.nvm" + +# ---- User configuration -------- + +# Preferred editor for local and remote sessions + if [[ -n $SSH_CONNECTION ]]; then + echo "πŸ”’ SSH connection detected" + else + export EDITOR='nvim' + fi + +# ------- aliases -------- +# Overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. + +# use iterm2 on zsh init +source ~/.iterm2_shell_integration.zsh + +# mysql +export PKG_CONFIG_PATH="/usr/local/opt/mysql-client/lib/pkgconfig" +export PATH="/usr/local/opt/mysql-client/bin:$PATH" +# Docker CLI completions. +fpath=(/Users/jenc/.docker/completions $fpath) + +# SSH agent socket for 1Password integration +export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock + +# devbox called only when `devbox` is typed +devbox() { + unfunction devbox + eval "$(command devbox global shellenv --preserve-path-stack -r)" + command devbox "$@" +} + +# Only start ssh-agent if not already running +if [ -z "$SSH_AUTH_SOCK" ]; then + eval "$(ssh-agent -s)" > /dev/null +fi + +# Add SSH key to agent with macOS keychain support +# This will prompt for passphrase once, then store it in macOS keychain +# Check if key is already in agent to avoid repeated prompts +if ! ssh-add -l 2>/dev/null | grep -q "id_ed25519"; then + ssh-add --apple-use-keychain ~/.ssh/id_ed25519 2>/dev/null || true + ssh-add --apple-use-keychain ~/.ssh/id_rsa 2>/dev/null || true +fi + +# pnpm +export PNPM_HOME="/Users/jenc/Library/pnpm" +case ":$PATH:" in + *":$PNPM_HOME:"*) ;; + *) export PATH="$PNPM_HOME:$PATH" ;; +esac +# pnpm end +# uv +eval "$(uv generate-shell-completion zsh)" +export PATH="$HOME/.local/bin:$PATH" +# ------------ Paths ------------ + +# mysql if using mysql +if [[ -f /opt/homebrew/opt/mysql/bin/mysql ]]; then + export PATH="/opt/homebrew/opt/mysql/bin:$PATH" + export PATH="/opt/homebrew/opt/mysql@8.0/bin:$PATH" + export PATH="/opt/homebrew/opt/mysql@8.4/bin:$PATH" + export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH" +fi + +# Load fnm (Fast Node Manager) +eval "$(fnm env --use-on-cd)" + +# load aliases +source ~/.osx_aliasrc +# opencode +export PATH=/Users/jenc/.opencode/bin:$PATH From 149002725b5091760865a409c3c72a4135224172 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:11:51 -0400 Subject: [PATCH 02/27] fix: add cursor cache directories to .gitignore --- .gitignore | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index af62465..f947dd8 100644 --- a/.gitignore +++ b/.gitignore @@ -101,10 +101,10 @@ result-* # ===================================================================== # Stow Package-Specific Ignores # ===================================================================== -# Cursor (macOS) - cache directories -stow/macos/cursor/.cursor/plugins/cache/** -stow/macos/cursor/.cursor/argv.json -stow/macos/cursor/.cursor/(projects|plans|plugins|rules|skills-cursor)/** +# Cursor (macOS) - cache and plugin directories +stow/macos/cursor/.cursor/ +cursor/.cursor/ + # 1Password (if contains sensitive data) stow/common/1Password/.op/ stow/common/1Password/config** @@ -118,4 +118,3 @@ gemini/** # Ollama ollama/** -stow/macos/cursor/.cursor/ From e58a7769cb1768af042d466d7b4d3e85bde8e9a9 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:14:10 -0400 Subject: [PATCH 03/27] fix: remove duplicate zsh from stow/common (already in stow/macos) --- stow/common/zsh/.osx_aliasrc | 116 -------------------------- stow/common/zsh/.zshenv | 8 -- stow/common/zsh/.zshrc | 128 ----------------------------- stow/macos/husky/.husky/.gitignore | 1 + stow/macos/husky/.husky/pre-commit | 4 + 5 files changed, 5 insertions(+), 252 deletions(-) delete mode 100644 stow/common/zsh/.osx_aliasrc delete mode 100644 stow/common/zsh/.zshenv delete mode 100644 stow/common/zsh/.zshrc create mode 100644 stow/macos/husky/.husky/.gitignore create mode 100755 stow/macos/husky/.husky/pre-commit diff --git a/stow/common/zsh/.osx_aliasrc b/stow/common/zsh/.osx_aliasrc deleted file mode 100644 index e62418d..0000000 --- a/stow/common/zsh/.osx_aliasrc +++ /dev/null @@ -1,116 +0,0 @@ -## OSX aliases -# python -alias python='python3' -alias pip='pip3' - -# git -alias g='git' - -# Make files untracked by git -# example: assume -alias assume='git update-index --assume-unchanged' - -# example: unassume -alias unassume='git update-index --no-assume-unchanged' -alias reload='source ~/.zshrc' - -# editors/code assistants -alias vi='nvim' -alias cursor='/Applications/Cursor.app/Contents/Resources/app/bin/cursor' -# Ollama aliases -alias ol='ollama' -alias olcode='ollama run codellama:7b' -alias 'ol ls'='ollama list' -alias 'ol upgrade'='brew upgrade ollama' - -# databases -alias mysql='/opt/homebrew/bin/mysql' -alias mysqladmin='/opt/homebrew/bin/mysqladmin' - -# ssh -# If you need a username, use: alias thingymachine='ssh user@68.183.204.78' -alias thingymachine='ssh 68.183.204.78' -alias expose='../script/expose.sh' - -# shell aliases -alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app' -alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app' - -alias zshconfig='mate ~/.zshrc' - -# brew -alias brewup='brew update; brew upgrade; brew prune; brew cleanup; brew doctor' - -# package management -# pnpm -alias p='pnpm' - -# php / Laravel -alias composer='php /usr/local/bin/composer.phar' -alias sail='[ -f sail ] && zsh sail || zsh vendor/bin/sail' -alias pint='./vendor/bin/pint' - -# nektos/act -alias act='act --container-architecture linux/amd64' - -# kubernetes -alias k='kubectl' - -# Functions for common tasks - -## Ollama functions - -# Example: ask 'What is the capital of France?' -function ask() { - printf '%s\n' "$1" | ollama run llama3.2 -} - -# Example: review -function review() { - cat "$1" | ollama run codellama 'Review this code for bugs and improvements:' -} - -# Example: translate 'Hello' 'French' -function translate() { - printf '%s\n' "$1" | ollama run llama3.2 "Translate to $2:" -} - -# Model management -# olshow -# Example: olshow 'llama3.2' -function olshow() { - ollama show "$1" -} - -function model_size() { - du -sh ~/.ollama/models/* 2>/dev/null || echo "No models found at ~/.ollama/models" -} - -# nvm / node -# Define as a function so $NVM_DIR expands correctly -get-nvm() { - if [ -n "$NVM_DIR" ]; then - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" - else - echo "NVM_DIR is not set" - fi -} - -# OS X specific aliases -# delete .DS_Store files from a directory path -# usage: delete_ds -delete_ds(){ - # list files to be deleted - echo -e "This will delete all .DS_Store files from $1 and its subdirectories.\n" - find "$1" -name '.DS_Store' -print - echo 'Are you sure? (y/n)' - read -r answer - if [[ $answer != y ]]; then - echo 'Aborting.' - return - else - echo "Deleting .DS_Store files from $1..." - find "$1" -name '.DS_Store' -delete -print - fi -} diff --git a/stow/common/zsh/.zshenv b/stow/common/zsh/.zshenv deleted file mode 100644 index c2fdbbe..0000000 --- a/stow/common/zsh/.zshenv +++ /dev/null @@ -1,8 +0,0 @@ -. "$HOME/.cargo/env" - -# don't create .DS_Store files on network volumes -defaults write com.apple.desktopservices DSDontWriteNetworkStores true -# don't create .DS_Store files on USB volumes -defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true -# show hidden files in Finder by default -defaults write com.apple.finder AppleShowAllFiles YES diff --git a/stow/common/zsh/.zshrc b/stow/common/zsh/.zshrc deleted file mode 100644 index 19fa71c..0000000 --- a/stow/common/zsh/.zshrc +++ /dev/null @@ -1,128 +0,0 @@ -# OPENSPEC:START -# OpenSpec shell completions configuration -fpath=("/Users/jenc/.oh-my-zsh/custom/completions" $fpath) -autoload -Uz compinit -compinit -# OPENSPEC:END - -# If not running interactively, don't do anything -[ -z "$PS1" ] && return - -# ---- theme ---- -export PROMPT='~🧻 ' -export ZSH_THEME="robbyrussell" - -# Uncomment the following line to change how often to auto-update (in days). -zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -DISABLE_UNTRACKED_FILES_DIRTY="true" - -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -HIST_STAMPS="yyyy-mm-dd" - -# ---- Plugins ---- -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -plugins=(git 1password gh zsh-autosuggestions zsh-autocomplete direnv) - -# Set ZSH path before sourcing oh-my-zsh -# ZSH must point to the oh-my-zsh installation directory -export ZSH="$HOME/.oh-my-zsh" - -# ZSH_CUSTOM points to custom plugins/aliases (managed via stow) -export ZSH_CUSTOM="$HOME/.oh-my-zsh/custom" -# Load oh-my-zsh -source "$ZSH/oh-my-zsh.sh" -export NVM_DIR="$HOME/.nvm" - -# ---- User configuration -------- - -# Preferred editor for local and remote sessions - if [[ -n $SSH_CONNECTION ]]; then - echo "πŸ”’ SSH connection detected" - else - export EDITOR='nvim' - fi - -# ------- aliases -------- -# Overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. - - -# use iterm2 on zsh init -source ~/.iterm2_shell_integration.zsh - -# mysql -export PKG_CONFIG_PATH="/usr/local/opt/mysql-client/lib/pkgconfig" -export PATH="/usr/local/opt/mysql-client/bin:$PATH" -# Docker CLI completions. -fpath=(/Users/jenc/.docker/completions $fpath) - -# SSH agent socket for 1Password integration -export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock - -# devbox called only when `devbox` is typed -devbox() { - unfunction devbox - eval "$(command devbox global shellenv --preserve-path-stack -r)" - command devbox "$@" -} - -# Only start ssh-agent if not already running -if [ -z "$SSH_AUTH_SOCK" ]; then - eval "$(ssh-agent -s)" > /dev/null -fi - -# Add SSH key to agent with macOS keychain support -# This will prompt for passphrase once, then store it in macOS keychain -# Check if key is already in agent to avoid repeated prompts -if ! ssh-add -l 2>/dev/null | grep -q "id_ed25519"; then - ssh-add --apple-use-keychain ~/.ssh/id_ed25519 2>/dev/null || true - ssh-add --apple-use-keychain ~/.ssh/id_rsa 2>/dev/null || true -fi - -# pnpm -export PNPM_HOME="/Users/jenc/Library/pnpm" -case ":$PATH:" in - *":$PNPM_HOME:"*) ;; - *) export PATH="$PNPM_HOME:$PATH" ;; -esac -# pnpm end -# uv -eval "$(uv generate-shell-completion zsh)" -export PATH="$HOME/.local/bin:$PATH" -# ------------ Paths ------------ - -# mysql if using mysql -if [[ -f /opt/homebrew/opt/mysql/bin/mysql ]]; then - export PATH="/opt/homebrew/opt/mysql/bin:$PATH" - export PATH="/opt/homebrew/opt/mysql@8.0/bin:$PATH" - export PATH="/opt/homebrew/opt/mysql@8.4/bin:$PATH" - export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH" -fi -# add homebrew sbin to path -export PATH="/opt/homebrew/sbin:$PATH" - -# Load fnm (Fast Node Manager) -eval "$(fnm env --use-on-cd)" - -# load aliases -source ~/.osx_aliasrc -# opencode -export PATH=/Users/jenc/.opencode/bin:$PATH diff --git a/stow/macos/husky/.husky/.gitignore b/stow/macos/husky/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/stow/macos/husky/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/stow/macos/husky/.husky/pre-commit b/stow/macos/husky/.husky/pre-commit new file mode 100755 index 0000000..4395aef --- /dev/null +++ b/stow/macos/husky/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" +# lint only staged files +npx --no-install lint-staged From 172239198771d9b2ba6baa1c00bfa29c93622c37 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:17:18 -0400 Subject: [PATCH 04/27] refactor: remove old directories (now in stow/) - Remove old root directories (bash, nvim, zsh, etc.) - Remove old nix/ directory (config now in hosts/nixos/) - Files are now organized in stow/common/, stow/macos/, stow/linux/ --- act/.actrc | 3 - bash/.bash_aliases | 77 -------- bash/.bash_login | 24 --- bash/.bash_profile | 14 -- bash/.bashrc | 102 ---------- bash/.inputrc | 15 -- cursor/.cursor/argv.json | 20 -- direnv/.config/direnv/direnvrc | 61 ------ docker/.docker/daemon.json | 9 - gh/.config/gh/.vscode/settings.json | 22 --- gh/.config/gh/config.yml | 16 -- gh/.config/gh/hosts.yml | 5 - git/.gitconfig | 55 ------ git/.gitignore_global | 28 --- husky/.husky/.gitignore | 1 - husky/.husky/pre-commit | 4 - iterm2/.iterm2_shell_integration.zsh | 178 ----------------- local-ai-setup.md | 53 ------ nix/etc/.bashrc | 9 - nix/etc/nix/nix.conf | 1 - nix/etc/nixos/configuration.nix | 144 -------------- nix/scripts/clean.sh | 144 -------------- nvim/.config/nvim/.gitignore | 9 - nvim/.config/nvim/.neoconf.json | 16 -- nvim/.config/nvim/LICENSE | 201 -------------------- nvim/.config/nvim/README.md | 4 - nvim/.config/nvim/init.lua | 2 - nvim/.config/nvim/lazy-lock.json | 50 ----- nvim/.config/nvim/lazyvim.json | 19 -- nvim/.config/nvim/lua/config/autocmds.lua | 8 - nvim/.config/nvim/lua/config/keymaps.lua | 22 --- nvim/.config/nvim/lua/config/lazy.lua | 144 -------------- nvim/.config/nvim/lua/config/options.lua | 7 - nvim/.config/nvim/lua/plugins/laravel.lua | 18 -- nvim/.config/nvim/lua/plugins/telescope.lua | 76 -------- nvim/.config/nvim/stylua.toml | 2 - op/.config/op/config | 16 -- verdaccio/.config/verdaccio/config.yaml | 201 -------------------- vim/.vimrc | 10 - yarn/.yarnrc | 5 - zprofile/.zprofile | 29 --- zprofile/.zprofile.pysave | 2 - zsh/.osx_aliasrc | 116 ----------- zsh/.zshenv | 8 - zsh/.zshrc | 128 ------------- 45 files changed, 2078 deletions(-) delete mode 100644 act/.actrc delete mode 100755 bash/.bash_aliases delete mode 100755 bash/.bash_login delete mode 100644 bash/.bash_profile delete mode 100644 bash/.bashrc delete mode 100644 bash/.inputrc delete mode 100644 cursor/.cursor/argv.json delete mode 100644 direnv/.config/direnv/direnvrc delete mode 100644 docker/.docker/daemon.json delete mode 100644 gh/.config/gh/.vscode/settings.json delete mode 100644 gh/.config/gh/config.yml delete mode 100644 gh/.config/gh/hosts.yml delete mode 100644 git/.gitconfig delete mode 100644 git/.gitignore_global delete mode 100644 husky/.husky/.gitignore delete mode 100755 husky/.husky/pre-commit delete mode 100644 iterm2/.iterm2_shell_integration.zsh delete mode 100644 local-ai-setup.md delete mode 100644 nix/etc/.bashrc delete mode 100644 nix/etc/nix/nix.conf delete mode 100644 nix/etc/nixos/configuration.nix delete mode 100644 nix/scripts/clean.sh delete mode 100644 nvim/.config/nvim/.gitignore delete mode 100644 nvim/.config/nvim/.neoconf.json delete mode 100644 nvim/.config/nvim/LICENSE delete mode 100644 nvim/.config/nvim/README.md delete mode 100644 nvim/.config/nvim/init.lua delete mode 100644 nvim/.config/nvim/lazy-lock.json delete mode 100644 nvim/.config/nvim/lazyvim.json delete mode 100644 nvim/.config/nvim/lua/config/autocmds.lua delete mode 100644 nvim/.config/nvim/lua/config/keymaps.lua delete mode 100644 nvim/.config/nvim/lua/config/lazy.lua delete mode 100644 nvim/.config/nvim/lua/config/options.lua delete mode 100644 nvim/.config/nvim/lua/plugins/laravel.lua delete mode 100644 nvim/.config/nvim/lua/plugins/telescope.lua delete mode 100644 nvim/.config/nvim/stylua.toml delete mode 100644 op/.config/op/config delete mode 100644 verdaccio/.config/verdaccio/config.yaml delete mode 100644 vim/.vimrc delete mode 100644 yarn/.yarnrc delete mode 100644 zprofile/.zprofile delete mode 100644 zprofile/.zprofile.pysave delete mode 100644 zsh/.osx_aliasrc delete mode 100644 zsh/.zshenv delete mode 100644 zsh/.zshrc diff --git a/act/.actrc b/act/.actrc deleted file mode 100644 index ecfef1f..0000000 --- a/act/.actrc +++ /dev/null @@ -1,3 +0,0 @@ --P ubuntu-latest=node:16-buster-slim --P ubuntu-20.04=node:16-buster-slim --P ubuntu-18.04=node:16-buster-slim diff --git a/bash/.bash_aliases b/bash/.bash_aliases deleted file mode 100755 index f9a114e..0000000 --- a/bash/.bash_aliases +++ /dev/null @@ -1,77 +0,0 @@ -# Functions -mkcd() { - mkdir -p "$1" && cd "$1" -} - -extract() { - if [ -f $1 ]; then - case $1 in - *.tar.bz2) tar xjf $1 ;; - *.tar.gz) tar xzf $1 ;; - *.bz2) bunzip2 $1 ;; - *.rar) unrar e $1 ;; - *.gz) gunzip $1 ;; - *.tar) tar xf $1 ;; - *.tbz2) tar xjf $1 ;; - *.tgz) tar xzf $1 ;; - *.zip) unzip $1 ;; - *.Z) uncompress $1 ;; - *.7z) 7z x $1 ;; - *) echo "'$1' cannot be extracted via extract()" ;; - esac - else - echo "'$1' is not a valid file" - fi -} -# check if bash is the current shell -if [$SHELL === '/bin/bash']; then - alias reload='source ~/.bashrc' -fi - -alias update='sudo apt update && sudo apt upgrade' -alias install='sudo apt install' -alias remove='sudo apt remove' -alias autoremove='sudo apt autoremove' -alias search='apt search' -alias py='python3' -alias pip='pip3' - -# Improved directory listing -alias ll='ls -alF' -alias la='ls -A' -alias l='ls -CF' - -# git -alias g='git' - -# gh cli -alias copilot='gh copilot' -alias gcs='gh copilot suggest' -alias gce='gh copilot explain' - -# editors/code assistants -alias cc='claude code' -alias vi='/opt/nvim/bin/nvim' -alias nvim='/opt/nvim/bin/nvim' -alias sudov='sudo -e' -# soft shutdown/restart -alias xoff='sudo /usr/local/bin/xSoft.sh 0 27' -alias docker-compose='docker compose' -# kubernetes -alias k='kubectl' - -# enable color support of ls and also add handy aliases -if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' - alias dir='dir --color=auto' - alias grep='grep --color=auto' -fi - -cd() { - builtin cd "$@" || return - - if [ "$PWD" = "$HOME" ] || [[ $PWD == "$HOME"/* ]]; then - ls -AClht --color=auto --group-directories-first --time-style=full-iso - fi -} diff --git a/bash/.bash_login b/bash/.bash_login deleted file mode 100755 index ce61e85..0000000 --- a/bash/.bash_login +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -kernel=$(uname -r) -uptime=$(uptime -p) - -# Get IPs with interface labels -hostname=$(uname -n) -ip=$(ip -o addr show | awk '!/127.0.0.1|::1|fe80::/ {gsub(/\/.*/, "", $4); print $2": "$4}') -total_memory=$(awk '/^MemTotal:/ {print int($2/1024)}' /proc/meminfo) -free_memory=$(awk '/^MemAvailable:/ {print int($2/1024)}' /proc/meminfo) -used_memory=$((total_memory - free_memory)) - -if ((total_memory > 0)); then - memory_usage_percent=$((used_memory * 100 / total_memory)) -else - memory_usage_percent=0 -fi - -cowsay -f dragon "${hostname}@${ip}" | lolcat - -echo -e "Operating System:\t$(lsb_release -ds) ($(uname -o))" -echo -e "Processor:\t\t$(lscpu | awk -F ':' '/Model name/ {gsub(/^[ \t]+/, "", $2); print $2}')" -echo -e "Kernel:\t\t\t${kernel}" -echo -e "Uptime:\t\t\t${uptime}" -echo -e "Memory Usage:\t\tUsed ${used_memory} MB of ${total_memory} MB (${memory_usage_percent} %) ${free_memory} MB available " diff --git a/bash/.bash_profile b/bash/.bash_profile deleted file mode 100644 index b3d954f..0000000 --- a/bash/.bash_profile +++ /dev/null @@ -1,14 +0,0 @@ -# In bash/.bash_profile -# Get the aliases and functions -if [ -f ~/.bashrc ]; then - . ~/.bashrc - . ~/.bash_login -fi - -# If not running interactively, don't do anything -[ -z "$PS1" ] && return - -# Set up fzf key bindings and fuzzy completion -eval "$(fzf --bash)" -eval "$(devbox global shellenv --init-hook)" -eval "$(direnv hook bash)" diff --git a/bash/.bashrc b/bash/.bashrc deleted file mode 100644 index 5da84bb..0000000 --- a/bash/.bashrc +++ /dev/null @@ -1,102 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. -# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) -# for examples - -# If not running interactively, don't do anything -case $- in -*i*) ;; -*) return ;; -esac - -# don't put duplicate lines or lines starting with space in the history. -# See bash(1) for more options -HISTCONTROL=ignoreboth - -# append to the history file, don't overwrite it -shopt -s histappend - -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000 -HISTFILESIZE=2000 - -# check the window size after each command and, if necessary, -# update the values of LINES and COLUMNS. -shopt -s checkwinsize - -# If set, the pattern "**" used in a pathname expansion context will -# match all files and zero or more directories and subdirectories. -#shopt -s globstar - -# make less more friendly for non-text input files, see lesspipe(1) -#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" - -# set variable identifying the chroot you work in (used in the prompt below) -if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) -fi - -# set a fancy prompt (non-color, unless we know we "want" color) -case "$TERM" in -xterm-color | *-256color) color_prompt=yes ;; -esac - -force_color_prompt=yes - -if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi -fi - -if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] ' -else - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' -fi -unset color_prompt force_color_prompt - -# If this is an xterm set the title to user@host:dir -case "$TERM" in -xterm* | rxvt*) - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" - ;; -*) ;; -esac - -# colored GCC warnings and errors -export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' - -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bash_aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. - -if [ -f ~/.bash_aliases ]; then - source ~/.bash_aliases -fi - -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -if ! shopt -oq posix; then - if [ -f /usr/share/bash-completion/bash_completion ]; then - . /usr/share/bash-completion/bash_completion - elif [ -f /etc/bash_completion ]; then - . /etc/bash_completion - fi -fi - -export PATH="$HOME/.local/bin:$PATH" - -# move nvim into /opt/ for debian -export PATH="/opt/nvim/bin:$PATH" -alias xoff='sudo /usr/local/bin/xSoft.sh 0 27' - -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/bash/.inputrc b/bash/.inputrc deleted file mode 100644 index 924ce6a..0000000 --- a/bash/.inputrc +++ /dev/null @@ -1,15 +0,0 @@ -# allow the command prompt to wrap to the next line -set horizontal-scroll-mode On - -# none, visible or audible -set bell-style visible - -# Make Tab autocomplete regardless of filename case -set completion-ignore-case on - -## ------- Keybindings ----- ## - -# Left Arrow (or Ctrl+Left Arrow) -"\eOd": backward-word -# Right Arrow (or Ctrl+Right Arrow -"\eOc": forward-word \ No newline at end of file diff --git a/cursor/.cursor/argv.json b/cursor/.cursor/argv.json deleted file mode 100644 index 4355133..0000000 --- a/cursor/.cursor/argv.json +++ /dev/null @@ -1,20 +0,0 @@ -// This configuration file allows you to pass permanent command line arguments to VS Code. -// Only a subset of arguments is currently supported to reduce the likelihood of breaking -// the installation. -// -// PLEASE DO NOT CHANGE WITHOUT UNDERSTANDING THE IMPACT -// -// NOTE: Changing this file requires a restart of VS Code. -{ - // Use software rendering instead of hardware accelerated rendering. - // This can help in cases where you see rendering issues in VS Code. - // "disable-hardware-acceleration": true, - - // Allows to disable crash reporting. - // Should restart the app if the value is changed. - "enable-crash-reporter": true, - - // Unique id used for correlating crash reports sent from this instance. - // Do not edit this value. - "crash-reporter-id": "e6556d5a-31c1-49e7-a0f7-167e4d980e86" -} \ No newline at end of file diff --git a/direnv/.config/direnv/direnvrc b/direnv/.config/direnv/direnvrc deleted file mode 100644 index e594bb5..0000000 --- a/direnv/.config/direnv/direnvrc +++ /dev/null @@ -1,61 +0,0 @@ -echo "πŸš€ Loading global direnvrc..." - -# -------Shell variables ------------ -export EDITOR='nvim' # default editor -# default editor -export EDITOR='nvim' -export SUDOEDITOR='nvim' -export VISUAL='nvim' -export PROMPT='~🧻 ' -# Suppress direnv export output -export DIRENV_LOG_FORMAT="" - -# ---- NodeJS fnm ---- -# Load fnm based on project context -# 1. If a .nvmrc or .node-version file exists β‡’ ensure that version is installed & used. -# 2. Else if a package.json exists β‡’ just source fnm so it's available on-demand. -# -# Sources: -# - https://blog.ffff.lt/posts/direnv-and-nvmrc/ -# - https://github.com/Schniz/fnm - -use_fnm() { - # fnm use automatically detects .nvmrc or .node-version and switches to that version - # It will also install the version if it's not already installed - fnm use -} - -# Initialize fnm if not already initialized -if ! command -v fnm &> /dev/null; then - # Try to source fnm from common locations - if [[ -s "$HOME/.fnm/fnm" ]]; then - eval "$("$HOME/.fnm/fnm" env --use-on-cd)" - elif [[ -s "$HOME/.local/share/fnm/fnm" ]]; then - eval "$("$HOME/.local/share/fnm/fnm" env --use-on-cd)" - fi -fi - -if [[ -f ".nvmrc" ]] || [[ -f ".node-version" ]]; then - # fnm use automatically handles version detection, installation, and switching - use_fnm -elif [[ -f "package.json" ]]; then - # No .nvmrc/.node-version, but JavaScript project detected β†’ just source fnm for convenience - # Ensure fnm is available in PATH - if command -v fnm &> /dev/null; then - echo "✨ fnm available due to package.json (no .nvmrc/.node-version found)." - fi -fi - - -# Auto-source dotfiles .envrc in every directory if not inside dotfiles directory -# or it will load twice -if [[ $PWD != "$HOME/.dotfiles" && -f .git ]]; then - dotenv_if_exists - source_env_if_exists "$HOME/.dotfiles/.envrc" - source_env_if_exists "$HOME/.dotfiles/.env.secret" -fi - -# php composer -if [[ -f composer.json ]]; then - PATH_add vendor/bin -fi diff --git a/docker/.docker/daemon.json b/docker/.docker/daemon.json deleted file mode 100644 index 31d00b7..0000000 --- a/docker/.docker/daemon.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "builder": { - "gc": { - "defaultKeepStorage": "20GB", - "enabled": true - } - }, - "experimental": false -} diff --git a/gh/.config/gh/.vscode/settings.json b/gh/.config/gh/.vscode/settings.json deleted file mode 100644 index 2bf6fa0..0000000 --- a/gh/.config/gh/.vscode/settings.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "workbench.colorCustomizations": { - "activityBar.activeBackground": "#0da9eb", - "activityBar.background": "#0da9eb", - "activityBar.foreground": "#15202b", - "activityBar.inactiveForeground": "#15202b99", - "activityBarBadge.background": "#fde1f5", - "activityBarBadge.foreground": "#15202b", - "commandCenter.border": "#e7e7e799", - "sash.hoverBorder": "#0da9eb", - "statusBar.background": "#0a86bb", - "statusBar.foreground": "#e7e7e7", - "statusBarItem.hoverBackground": "#0da9eb", - "statusBarItem.remoteBackground": "#0a86bb", - "statusBarItem.remoteForeground": "#e7e7e7", - "titleBar.activeBackground": "#0a86bb", - "titleBar.activeForeground": "#e7e7e7", - "titleBar.inactiveBackground": "#0a86bb99", - "titleBar.inactiveForeground": "#e7e7e799" - }, - "peacock.color": "#0a86bb" -} \ No newline at end of file diff --git a/gh/.config/gh/config.yml b/gh/.config/gh/config.yml deleted file mode 100644 index 97cf17c..0000000 --- a/gh/.config/gh/config.yml +++ /dev/null @@ -1,16 +0,0 @@ -# What protocol to use when performing git operations. Supported values: ssh, https -git_protocol: https -# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment. -editor: -# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled -prompt: enabled -# A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager. -pager: -# Aliases allow you to create nicknames for gh commands -aliases: - co: pr checkout -# The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport. -http_unix_socket: -# What web browser gh should use when opening URLs. If blank, will refer to environment. -browser: -version: "1" diff --git a/gh/.config/gh/hosts.yml b/gh/.config/gh/hosts.yml deleted file mode 100644 index a6c7664..0000000 --- a/gh/.config/gh/hosts.yml +++ /dev/null @@ -1,5 +0,0 @@ -github.com: - user: usrrname - git_protocol: ssh - users: - usrrname: diff --git a/git/.gitconfig b/git/.gitconfig deleted file mode 100644 index c31c81b..0000000 --- a/git/.gitconfig +++ /dev/null @@ -1,55 +0,0 @@ -[user] - username=usrrname - name = Jen Chan - email = 6406037+usrrname@users.noreply.github.com - signingkey = ~/.ssh/id_ed25519.pub -[color] - ui = auto - -[core] - editor = nvim - excludesFile = ~/.gitignore_global - -[gpg] - format = ssh - -[gpg "ssh"] - program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign" - -[commit] - gpgsign = true - -[push] - autoSetupRemote = true - -[init] - defaultBranch = main - -[pull] - rebase = true - -[alias] - g = git - gco = checkout - gst = status - gcb = checkout -b - gcm = commit -m - noedit = commit --amend --no-edit - - # log all commits - log = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate - - # prevent git from tracking any changes to a file - assume = "update-index --assume-unchanged" - - # show all files that have been marked assume-unchanged - assumed = "!git ls-files -v | grep ^h | cut -c 3-" - - # restore git trackable - unassume = "update-index --no-assume-unchanged" - - # unassume all the assumed files - unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged" - - # list all aliases - alias = "!git config -l | grep alias | cut -c 7-" diff --git a/git/.gitignore_global b/git/.gitignore_global deleted file mode 100644 index e4b3a27..0000000 --- a/git/.gitignore_global +++ /dev/null @@ -1,28 +0,0 @@ -# Direnv files -.direnv -.envrc - -# macOS specific files and folders -.DS_Store - -# Temporary files -tmp/** -.zcompdump-* - -# Editor specific files and folders -.idea -.vscode -.cursorrules -.cursor -.goosehint - -# Environment variables -!.env.schema -.env* -.envrc -id_* -id_ed25519* -id_rsa* -.pem* -.cert* -.crt* diff --git a/husky/.husky/.gitignore b/husky/.husky/.gitignore deleted file mode 100644 index 31354ec..0000000 --- a/husky/.husky/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_ diff --git a/husky/.husky/pre-commit b/husky/.husky/pre-commit deleted file mode 100755 index 4395aef..0000000 --- a/husky/.husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" -# lint only staged files -npx --no-install lint-staged diff --git a/iterm2/.iterm2_shell_integration.zsh b/iterm2/.iterm2_shell_integration.zsh deleted file mode 100644 index 7871ddd..0000000 --- a/iterm2/.iterm2_shell_integration.zsh +++ /dev/null @@ -1,178 +0,0 @@ -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -if [[ -o interactive ]]; then - if [ "${ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX-}""$TERM" != "tmux-256color" -a "${ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX-}""$TERM" != "screen" -a "${ITERM_SHELL_INTEGRATION_INSTALLED-}" = "" -a "$TERM" != linux -a "$TERM" != dumb ]; then - ITERM_SHELL_INTEGRATION_INSTALLED=Yes - ITERM2_SHOULD_DECORATE_PROMPT="1" - # Indicates start of command output. Runs just before command executes. - iterm2_before_cmd_executes() { - if [ "$TERM_PROGRAM" = "iTerm.app" ]; then - printf "\033]133;C;\r\007" - else - printf "\033]133;C;\007" - fi - } - - iterm2_set_user_var() { - printf "\033]1337;SetUserVar=%s=%s\007" "$1" $(printf "%s" "$2" | base64 | tr -d '\n') - } - - # Users can write their own version of this method. It should call - # iterm2_set_user_var but not produce any other output. - # e.g., iterm2_set_user_var currentDirectory $PWD - # Accessible in iTerm2 (in a badge now, elsewhere in the future) as - # \(user.currentDirectory). - whence -v iterm2_print_user_vars > /dev/null 2>&1 - if [ $? -ne 0 ]; then - iterm2_print_user_vars() { - true - } - fi - - iterm2_print_state_data() { - local _iterm2_hostname="${iterm2_hostname-}" - if [ -z "${iterm2_hostname:-}" ]; then - _iterm2_hostname=$(hostname -f 2>/dev/null) - fi - printf "\033]1337;RemoteHost=%s@%s\007" "$USER" "${_iterm2_hostname-}" - printf "\033]1337;CurrentDir=%s\007" "$PWD" - iterm2_print_user_vars - } - - # Report return code of command; runs after command finishes but before prompt - iterm2_after_cmd_executes() { - printf "\033]133;D;%s\007" "$STATUS" - iterm2_print_state_data - } - - # Mark start of prompt - iterm2_prompt_mark() { - printf "\033]133;A\007" - } - - # Mark end of prompt - iterm2_prompt_end() { - printf "\033]133;B\007" - } - - # There are three possible paths in life. - # - # 1) A command is entered at the prompt and you press return. - # The following steps happen: - # * iterm2_preexec is invoked - # * PS1 is set to ITERM2_PRECMD_PS1 - # * ITERM2_SHOULD_DECORATE_PROMPT is set to 1 - # * The command executes (possibly reading or modifying PS1) - # * iterm2_precmd is invoked - # * ITERM2_PRECMD_PS1 is set to PS1 (as modified by command execution) - # * PS1 gets our escape sequences added to it - # * zsh displays your prompt - # * You start entering a command - # - # 2) You press ^C while entering a command at the prompt. - # The following steps happen: - # * (iterm2_preexec is NOT invoked) - # * iterm2_precmd is invoked - # * iterm2_before_cmd_executes is called since we detected that iterm2_preexec was not run - # * (ITERM2_PRECMD_PS1 and PS1 are not messed with, since PS1 already has our escape - # sequences and ITERM2_PRECMD_PS1 already has PS1's original value) - # * zsh displays your prompt - # * You start entering a command - # - # 3) A new shell is born. - # * PS1 has some initial value, either zsh's default or a value set before this script is sourced. - # * iterm2_precmd is invoked - # * ITERM2_SHOULD_DECORATE_PROMPT is initialized to 1 - # * ITERM2_PRECMD_PS1 is set to the initial value of PS1 - # * PS1 gets our escape sequences added to it - # * Your prompt is shown and you may begin entering a command. - # - # Invariants: - # * ITERM2_SHOULD_DECORATE_PROMPT is 1 during and just after command execution, and "" while the prompt is - # shown and until you enter a command and press return. - # * PS1 does not have our escape sequences during command execution - # * After the command executes but before a new one begins, PS1 has escape sequences and - # ITERM2_PRECMD_PS1 has PS1's original value. - iterm2_decorate_prompt() { - # This should be a raw PS1 without iTerm2's stuff. It could be changed during command - # execution. - ITERM2_PRECMD_PS1="$PS1" - ITERM2_SHOULD_DECORATE_PROMPT="" - - # Add our escape sequences just before the prompt is shown. - # Use ITERM2_SQUELCH_MARK for people who can't mdoify PS1 directly, like powerlevel9k users. - # This is gross but I had a heck of a time writing a correct if statetment for zsh 5.0.2. - local PREFIX="" - if [[ $PS1 == *"$(iterm2_prompt_mark)"* ]]; then - PREFIX="" - elif [[ "${ITERM2_SQUELCH_MARK-}" != "" ]]; then - PREFIX="" - else - PREFIX="%{$(iterm2_prompt_mark)%}" - fi - PS1="$PREFIX$PS1%{$(iterm2_prompt_end)%}" - ITERM2_DECORATED_PS1="$PS1" - } - - iterm2_precmd() { - local STATUS="$?" - if [ -z "${ITERM2_SHOULD_DECORATE_PROMPT-}" ]; then - # You pressed ^C while entering a command (iterm2_preexec did not run) - iterm2_before_cmd_executes - if [ "$PS1" != "${ITERM2_DECORATED_PS1-}" ]; then - # PS1 changed, perhaps in another precmd. See issue 9938. - ITERM2_SHOULD_DECORATE_PROMPT="1" - fi - fi - - iterm2_after_cmd_executes "$STATUS" - - if [ -n "$ITERM2_SHOULD_DECORATE_PROMPT" ]; then - iterm2_decorate_prompt - fi - } - - # This is not run if you press ^C while entering a command. - iterm2_preexec() { - # Set PS1 back to its raw value prior to executing the command. - PS1="$ITERM2_PRECMD_PS1" - ITERM2_SHOULD_DECORATE_PROMPT="1" - iterm2_before_cmd_executes - } - - # If hostname -f is slow on your system set iterm2_hostname prior to - # sourcing this script. We know it is fast on macOS so we don't cache - # it. That lets us handle the hostname changing like when you attach - # to a VPN. - if [ -z "${iterm2_hostname-}" ]; then - if [ "$(uname)" != "Darwin" ]; then - iterm2_hostname=`hostname -f 2>/dev/null` - # Some flavors of BSD (i.e. NetBSD and OpenBSD) don't have the -f option. - if [ $? -ne 0 ]; then - iterm2_hostname=`hostname` - fi - fi - fi - - [[ -z ${precmd_functions-} ]] && precmd_functions=() - precmd_functions=($precmd_functions iterm2_precmd) - - [[ -z ${preexec_functions-} ]] && preexec_functions=() - preexec_functions=($preexec_functions iterm2_preexec) - - iterm2_print_state_data - printf "\033]1337;ShellIntegrationVersion=14;shell=zsh\007" - fi -fi diff --git a/local-ai-setup.md b/local-ai-setup.md deleted file mode 100644 index 3ecf102..0000000 --- a/local-ai-setup.md +++ /dev/null @@ -1,53 +0,0 @@ -# Local AI Setup - -## Install Goose - -```bash -brew install block-cli-goose -``` - -# Container Use Setup - -## Install Container Use - -https://container-use.com/quickstart - -```bash -brew install dagger/tap/container-use -``` - -## Install Ollama - -Mac OS: https://docs.ollama.com/macos -Linux: https://docs.ollama.com/linux - -```bash -Environment Variables: - OLLAMA_DEBUG Show additional debug information (e.g. OLLAMA_DEBUG=1) - OLLAMA_HOST IP Address for the ollama server (default 127.0.0.1:11434) - OLLAMA_CONTEXT_LENGTH Context length to use unless otherwise specified (default: 2048) - OLLAMA_KEEP_ALIVE The duration that models stay loaded in memory (default "5m") - OLLAMA_MAX_LOADED_MODELS Maximum number of loaded models per GPU - OLLAMA_MAX_QUEUE Maximum number of queued requests - OLLAMA_MODELS The path to the models directory - OLLAMA_NUM_PARALLEL Maximum number of parallel requests - OLLAMA_NOPRUNE Do not prune model blobs on startup - OLLAMA_ORIGINS A comma separated list of allowed origins - OLLAMA_SCHED_SPREAD Always schedule model across all GPUs - OLLAMA_FLASH_ATTENTION Enabled flash attention - OLLAMA_KV_CACHE_TYPE Quantization type for the K/V cache (default: f16) - OLLAMA_LLM_LIBRARY Set LLM library to bypass autodetection - OLLAMA_GPU_OVERHEAD Reserve a portion of VRAM per GPU (bytes) - OLLAMA_LOAD_TIMEOUT How long to allow model loads to stall before giving up (default "5m") -``` - -[Setting Environment Variables on Linux](https://docs.ollama.com/faq#setting-environment-variables-on-linux) -[Setting Environment Variables on macOS](https://docs.ollama.com/faq#setting-environment-variables-on-mac) - -Example: -``` -export OLLAMA_HOST="0.0.0.0:11434" - -# macOS only -launchctl setenv OLLAMA_HOST "0.0.0.0:11434" -``` \ No newline at end of file diff --git a/nix/etc/.bashrc b/nix/etc/.bashrc deleted file mode 100644 index 318cfad..0000000 --- a/nix/etc/.bashrc +++ /dev/null @@ -1,9 +0,0 @@ -# bashrc completion -if [ -f ~/.nix-profile/etc/bash_completion.d/nix ]; then - source ~/.nix-profile/etc/bash_completion.d/nix -fi - -# Only start ssh-agent if not already running -if [ -z "$SSH_AUTH_SOCK" ]; then - eval "$(ssh-agent -s)" > /dev/null -fi \ No newline at end of file diff --git a/nix/etc/nix/nix.conf b/nix/etc/nix/nix.conf deleted file mode 100644 index 2c4e83f..0000000 --- a/nix/etc/nix/nix.conf +++ /dev/null @@ -1 +0,0 @@ -experimental-features = nix-command flakes \ No newline at end of file diff --git a/nix/etc/nixos/configuration.nix b/nix/etc/nixos/configuration.nix deleted file mode 100644 index 6ff7a51..0000000 --- a/nix/etc/nixos/configuration.nix +++ /dev/null @@ -1,144 +0,0 @@ -# Global system config -# Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running β€˜nixos-help’). - -{ config, pkgs, ... }: - -{ -imports = [ - # Include the results of the hardware scan. - # ./hardware-configuration.nix - (fetchTarball "https://github.com/nix-community/nixos-vscode-server/tarball/master") -]; - - - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - networking.hostName = "nixos"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Enable networking - networking.networkmanager.enable = true; - - # Set your time zone. - time.timeZone = "America/Toronto"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_CA.UTF-8"; - -users.users.jenc = { - isNormalUser = true; - description = "jenc"; - extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; []; -}; - - programs.neovim = { - enable = true; - defaultEditor = true; - viAlias = true; - vimAlias = true; - configure = { - customRC = '' - let mapleader = "\" - lua << EOF - ${builtins.readFile /home/jenc/.config/nvim/init.lua} - - ${builtins.readFile /home/jenc/.config/nvim/lua/config/lazy.lua} - - ${builtins.readFile /home/jenc/.config/nvim/lua/config/keymaps.lua} - - ${builtins.readFile /home/jenc/.config/nvim/lua/config/autocmds.lua} - EOF - - ''; - }; - }; - - # Configure keymap in X11 - services.xserver.xkb = { - layout = "us"; - variant = ""; - }; - - system.userActivationScripts.zshrc = "touch .zshrc"; # to avoid being prompted to generate the config for first time - - programs.direnv.enable = true; - - # Enable Zsh with Oh My Zsh - programs.zsh = { - enable = true; - ohMyZsh = { - enable = true; - plugins = [ "git" "zsh-autosuggestions" "zsh-autocomplete" "1password" "gh" "direnv" ]; - theme = "robbyrussell"; - }; - }; - - - # Enable automatic login for the user. - services.getty.autologinUser = "jenc"; - - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - wget - direnv - gitFull - nixfmt-rfc-style - starship - vim - neovim - zsh - oh-my-zsh - tree - fzf - vimPlugins.nvim-cmp - vimPlugins.LazyVim -]; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - services.openssh.enable = true; - - services.vscode-server = { - enable = true; - installPath = "/home/jenc/.cursor-server"; - }; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - networking.firewall.enable = false; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. Itβ€˜s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "24.11"; - # automatic garbage collection - nix.gc.automatic = true; - # Run daily at 3:15 AM - nix.gc.dates = "03:15"; -} diff --git a/nix/scripts/clean.sh b/nix/scripts/clean.sh deleted file mode 100644 index 586561d..0000000 --- a/nix/scripts/clean.sh +++ /dev/null @@ -1,144 +0,0 @@ -#!/bin/bash - -# Nix garbage collection cleanup script -# Removes old direnv profiles and result symlinks, then runs GC - -set -e - -echo "=== Nix Store Cleanup Script ===" -echo - -# Check initial size -echo "Current /nix/store size:" -du -sh /nix/store -echo - -# Find all direnv flake profiles -echo "Finding direnv flake profiles to remove..." -DIRENV_PROFILES=$(find ~/proj -name 'flake-profile-*-link' -path '*/.direnv/*' 2>/dev/null || true) -if [ -z "$DIRENV_PROFILES" ]; then - PROFILE_COUNT=0 -else - PROFILE_COUNT=$(echo "$DIRENV_PROFILES" | wc -l) -fi -echo "Found $PROFILE_COUNT old direnv profile links" - -# Show some examples if found -if [ $PROFILE_COUNT -gt 0 ]; then - echo "Examples:" - echo "$DIRENV_PROFILES" | head -5 - echo -fi - -# Find result symlinks -echo "Finding result symlinks to remove..." -RESULT_LINKS=$(find ~/proj -maxdepth 3 -name 'result' -type l 2>/dev/null || true) -RESULT_COUNT=0 -if [ -n "$RESULT_LINKS" ]; then - RESULT_COUNT=$(echo "$RESULT_LINKS" | wc -l) -fi - -# Check for result in home -if [ -L ~/result ]; then - echo "Found ~/result symlink" - RESULT_COUNT=$((RESULT_COUNT + 1)) - if [ -z "$RESULT_LINKS" ]; then - RESULT_LINKS="$HOME/result" - else - RESULT_LINKS="$RESULT_LINKS -$HOME/result" - fi -fi - -echo "Found $RESULT_COUNT result symlinks" - -# Show some examples if found -if [ $RESULT_COUNT -gt 0 ]; then - echo "Examples:" - echo "$RESULT_LINKS" | head -5 - echo -fi - -# Nothing to clean -if [ $PROFILE_COUNT -eq 0 ] && [ $RESULT_COUNT -eq 0 ]; then - echo "No GC roots found to remove." - echo - read -p "Run garbage collection anyway? (y/N) " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo "Aborted." - exit 0 - fi -else - # Ask about direnv profiles - REMOVE_PROFILES=false - if [ $PROFILE_COUNT -gt 0 ]; then - read -p "Remove $PROFILE_COUNT direnv profile links? (y/N) " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - REMOVE_PROFILES=true - fi - fi - - # Ask about result symlinks - REMOVE_RESULTS=false - if [ $RESULT_COUNT -gt 0 ]; then - read -p "Remove $RESULT_COUNT result symlinks? (y/N) " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - REMOVE_RESULTS=true - fi - fi - - # Remove direnv profiles if approved - if [ "$REMOVE_PROFILES" = true ]; then - echo "Removing direnv profiles..." - find ~/proj -name 'flake-profile-*-link' -path '*/.direnv/*' -delete 2>/dev/null || true - echo "Done." - fi - - # Remove result symlinks if approved - if [ "$REMOVE_RESULTS" = true ]; then - echo "Removing result symlinks..." - find ~/proj -maxdepth 3 -name 'result' -type l -delete 2>/dev/null || true - [ -L ~/result ] && rm ~/result - echo "Done." - fi - - echo -fi - -# Detect nix installation type -if [ -f /etc/profile.d/nix.sh ]; then - # Multi-user install - echo "Detected multi-user Nix installation" - echo - echo "Running garbage collection (user profile)..." - nix-collect-garbage -d - - echo - echo "Running garbage collection (system-wide, requires sudo)..." - sudo bash -c ". /etc/profile.d/nix.sh && nix-collect-garbage -d" - - echo - echo "Optimizing store (requires sudo)..." - sudo bash -c ". /etc/profile.d/nix.sh && nix-store --optimize" -else - # Single-user install - echo "Detected single-user Nix installation" - echo - echo "Running garbage collection..." - nix-collect-garbage -d - - echo - echo "Optimizing store..." - nix-store --optimize -fi - -# Show final size -echo -echo "Final /nix/store size:" -du -sh /nix/store - -echo -echo "=== Cleanup complete ===" diff --git a/nvim/.config/nvim/.gitignore b/nvim/.config/nvim/.gitignore deleted file mode 100644 index 64fc731..0000000 --- a/nvim/.config/nvim/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -.DS_Store -tt.* -.tests -doc/tags -debug -.repro -foo.* -*.log -data diff --git a/nvim/.config/nvim/.neoconf.json b/nvim/.config/nvim/.neoconf.json deleted file mode 100644 index 361aeaa..0000000 --- a/nvim/.config/nvim/.neoconf.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "neodev": { - "library": { - "enabled": true, - "plugins": [ - "plenary.nvim" - ] - } - }, - "lspconfig": { - "lua_ls": { - "Lua.runtime.version": "LuaJIT", - "Lua.workspace.checkThirdParty": false - } - } -} diff --git a/nvim/.config/nvim/LICENSE b/nvim/.config/nvim/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/nvim/.config/nvim/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/nvim/.config/nvim/README.md b/nvim/.config/nvim/README.md deleted file mode 100644 index 185280b..0000000 --- a/nvim/.config/nvim/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# πŸ’€ LazyVim - -A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). -Refer to the [documentation](https://lazyvim.github.io/installation) to get started. diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua deleted file mode 100644 index 2514f9e..0000000 --- a/nvim/.config/nvim/init.lua +++ /dev/null @@ -1,2 +0,0 @@ --- bootstrap lazy.nvim, LazyVim and your plugins -require("config.lazy") diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json deleted file mode 100644 index 93914b6..0000000 --- a/nvim/.config/nvim/lazy-lock.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "LazyVim": { "branch": "main", "commit": "28db03f958d58dfff3c647ce28fdc1cb88ac158d" }, - "SchemaStore.nvim": { "branch": "main", "commit": "fb5f164a28f8fd5a052da512436d4173e06cf71e" }, - "avante.nvim": { "branch": "main", "commit": "7e50de89049ea3540f0d39acec7b68a74a5d1edb" }, - "blink-cmp-avante": { "branch": "master", "commit": "e5a1be4c818520385f95fe2663c04e48f5f0c36a" }, - "blink-copilot": { "branch": "main", "commit": "41e91a659bd9b8cba9ba2ea68a69b52ba5a9ebd8" }, - "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, - "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "catppuccin": { "branch": "main", "commit": "cb5665990a797b102715188e73c44c3931b3b42e" }, - "conform.nvim": { "branch": "master", "commit": "3543d000dafbc41cc7761d860cfdb24e82154f75" }, - "copilot.lua": { "branch": "master", "commit": "e78d1ffebdf6ccb6fd8be4e6898030c1cf5f9b64" }, - "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" }, - "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "fzf-lua": { "branch": "main", "commit": "47b85a25c0c0b2c20b4e75199ed01bb71e7814f5" }, - "gh.nvim": { "branch": "main", "commit": "6f367b2ab8f9d4a0a23df2b703a3f91137618387" }, - "gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" }, - "grug-far.nvim": { "branch": "main", "commit": "794f03c97afc7f4b03fb6ec5111be507df1850cf" }, - "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, - "lazydev.nvim": { "branch": "main", "commit": "01bc2aacd51cf9021eb19d048e70ce3dd09f7f93" }, - "litee.nvim": { "branch": "main", "commit": "bf366a1414fd0f9401631ac8884f2f9fa4bf18d2" }, - "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, - "markdown-preview.nvim": { "branch": "master", "commit": "9becceee5740b7db6914da87358a183ad11b2049" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "f2fa60409630ec2d24acf84494fb55e1d28d593c" }, - "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, - "mini.ai": { "branch": "main", "commit": "bfb26d9072670c3aaefab0f53024b2f3729c8083" }, - "mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" }, - "mini.pairs": { "branch": "main", "commit": "d5a29b6254dad07757832db505ea5aeab9aad43a" }, - "mini.starter": { "branch": "main", "commit": "8ee6ce6a4c9be47682516908557cc062c4d595a2" }, - "neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, - "noice.nvim": { "branch": "main", "commit": "cf758e9df66451889aab56613a21b8673f045ec2" }, - "nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" }, - "nvim-lint": { "branch": "master", "commit": "1f19dacd945a7b1a57f29f32b2d7168384df3d36" }, - "nvim-lspconfig": { "branch": "master", "commit": "5bfcc89fd155b4ffc02d18ab3b7d19c2d4e246a7" }, - "nvim-treesitter": { "branch": "main", "commit": "99dfc5acefd7728cec4ad0d0a6a9720f2c2896ff" }, - "nvim-treesitter-textobjects": { "branch": "main", "commit": "28a3494c075ef0f353314f627546537e43c09592" }, - "nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" }, - "octo.nvim": { "branch": "master", "commit": "4a3a4fc5a9d3a372c91041f5b846f33b8d6b31fa" }, - "persistence.nvim": { "branch": "main", "commit": "c45ff862b53ce07a853a753fb0b33e148dbb99d2" }, - "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "render-markdown.nvim": { "branch": "main", "commit": "6a744f0d14fd1d0fa8e3f446ac7825ec1e351d55" }, - "snacks.nvim": { "branch": "main", "commit": "a4e46becca45eb65c73a388634b1ce8aad629ae0" }, - "telescope-file-browser.nvim": { "branch": "master", "commit": "3610dc7dc91f06aa98b11dca5cc30dfa98626b7e" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, - "telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" }, - "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, - "tokyonight.nvim": { "branch": "main", "commit": "545d72cde6400835d895160ecb5853874fd5156d" }, - "trouble.nvim": { "branch": "main", "commit": "748ca2789044607f19786b1d837044544c55e80a" }, - "ts-comments.nvim": { "branch": "main", "commit": "79e4337e4231ff8ca33dab85162b5ee8e78f22ce" }, - "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" } -} diff --git a/nvim/.config/nvim/lazyvim.json b/nvim/.config/nvim/lazyvim.json deleted file mode 100644 index 6effbf7..0000000 --- a/nvim/.config/nvim/lazyvim.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extras": [ - "lazyvim.plugins.extras.ai.avante", - "lazyvim.plugins.extras.editor.neo-tree", - "lazyvim.plugins.extras.lang.go", - "lazyvim.plugins.extras.lang.markdown", - "lazyvim.plugins.extras.lang.nix", - "lazyvim.plugins.extras.lang.toml", - "lazyvim.plugins.extras.ui.mini-starter", - "lazyvim.plugins.extras.util.dot", - "lazyvim.plugins.extras.util.gh", - "lazyvim.plugins.extras.util.gitui", - "lazyvim.plugins.extras.util.octo" - ], - "news": { - "NEWS.md": "11866" - }, - "version": 8 -} \ No newline at end of file diff --git a/nvim/.config/nvim/lua/config/autocmds.lua b/nvim/.config/nvim/lua/config/autocmds.lua deleted file mode 100644 index 853071b..0000000 --- a/nvim/.config/nvim/lua/config/autocmds.lua +++ /dev/null @@ -1,8 +0,0 @@ --- Autocmds are automatically loaded on the VeryLazy event --- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua --- --- Add any additional autocmds here --- with `vim.api.nvim_create_autocmd` --- --- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults) --- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell") \ No newline at end of file diff --git a/nvim/.config/nvim/lua/config/keymaps.lua b/nvim/.config/nvim/lua/config/keymaps.lua deleted file mode 100644 index f3c129a..0000000 --- a/nvim/.config/nvim/lua/config/keymaps.lua +++ /dev/null @@ -1,22 +0,0 @@ --- Keymaps are automatically loaded on the VeryLazy event --- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua --- Map Command+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux) to Telescope - --- macOS-style keybindings - -vim.api.nvim_set_keymap("n", "", "ggVG", { desc = "Select all" }) - ---- Save and append in insert mode -- -vim.keymap.set("i", "", "wa", { desc = "Save" }) - --- Yank into system clipboard -vim.keymap.set({ "n", "v" }, "y", '"+y') -- yank motion - --- Paste from system clipboard -vim.keymap.set("n", "p", '"+p') -- paste after cursor - --- Reload LazyVim configuration -vim.keymap.set("n", "r", function() - vim.cmd("Lazy reload") - vim.cmd("Lazy sync") -end, { desc = "Reload Config" }) diff --git a/nvim/.config/nvim/lua/config/lazy.lua b/nvim/.config/nvim/lua/config/lazy.lua deleted file mode 100644 index b01611c..0000000 --- a/nvim/.config/nvim/lua/config/lazy.lua +++ /dev/null @@ -1,144 +0,0 @@ ----@diagnostic disable: undefined-global ---- evaluates to plugin manager path usually at $HOME/.local/share/lazy/lazy.nvim -- -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" --- Install lazy.nvim if not present -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "--branch=stable", - lazyrepo, - lazypath, - }) - - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end - --- Add lazy.nvim to runtime path -vim.opt.rtp:prepend(lazypath) - --- Setup lazy.nvim -return require("lazy").setup({ - spec = { - -- LazyVim core - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - -- Language extras - { import = "lazyvim.plugins.extras.lang.typescript" }, - { import = "lazyvim.plugins.extras.lang.json" }, - -- import/override with custom plugins - { import = "plugins" }, - -- NeoTree - { - "nvim-neo-tree/neo-tree.nvim", - opts = { - filesystem = { - filtered_items = { - hide_hidden = false, - hide_dotfiles = false, - hide_gitignored = true, - hide_ignored = false, -- hide files that are ignored by other gitignore-like files - -- other gitignore-like files, in descending order of precedence. - ignore_files = { - ".neotreeignore", - -- ".rgignore" - }, - }, - commands = { - avante_add_files = function(state) - local node = state.tree:get_node() - local filepath = node:get_id() - local relative_path = require('avante.utils').relative_path(filepath) - - local sidebar = require('avante').get() - - local open = sidebar:is_open() - -- ensure avante sidebar is open - if not open then - require('avante.api').ask() - sidebar = require('avante').get() - end - - sidebar.file_selector:add_selected_file(relative_path) - - -- remove neo tree buffer - if not open then - sidebar.file_selector:remove_selected_file('neo-tree filesystem [1]') - end - end, - }, - window = { - mappings = { - ['oa'] = 'avante_add_files', - }, - }, - }, - }, - }, - -- Treesitter configuration - { - "nvim-treesitter/nvim-treesitter", - opts = { - ensure_installed = { - "bash", - "html", - "javascript", - "json", - "lua", - "markdown", - "markdown_inline", - "python", - "query", - "regex", - "tsx", - "typescript", - "vim", - "yaml", - }, - }, - config = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "tsx", - "typescript", - "go", - }) - end, - }, - }, - defaults = { - lazy = false, - version = "*", - rocks = { - enabled = true, - hererocks = true, - lua = "5.1", - }, - }, - install = { colorscheme = { "catppuccin-macchiato" } }, - checker = { - enabled = true, - notify = true, - }, - performance = { - rtp = { - disabled_plugins = { - "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - "tarPlugin", - "tohtml", - "zipPlugin", - }, - }, - }, -}) diff --git a/nvim/.config/nvim/lua/config/options.lua b/nvim/.config/nvim/lua/config/options.lua deleted file mode 100644 index 1568d3c..0000000 --- a/nvim/.config/nvim/lua/config/options.lua +++ /dev/null @@ -1,7 +0,0 @@ --- Options are automatically loaded before lazy.nvim startup --- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua --- vim.g.lazyvim_php_lsp = "intelephense" -vim.g.mapleader = " " -vim.g.autoformat = true -vim.opt.clipboard = "unnamedplus" - diff --git a/nvim/.config/nvim/lua/plugins/laravel.lua b/nvim/.config/nvim/lua/plugins/laravel.lua deleted file mode 100644 index bc117b9..0000000 --- a/nvim/.config/nvim/lua/plugins/laravel.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - -- "adalessa/laravel.nvim", - -- dependencies = { - -- "tpope/vim-dotenv", - -- "nvim-telescope/telescope.nvim", - -- "MunifTanjim/nui.nvim", - -- "kevinhwang91/promise-async", - -- }, - -- cmd = { "Laravel" }, - -- keys = { - -- { "la", ":Laravel artisan" }, - -- { "lr", ":Laravel routes" }, - -- { "lm", ":Laravel related" }, - -- }, - -- event = { "VeryLazy" }, - -- opts = {}, - -- config = false, -} diff --git a/nvim/.config/nvim/lua/plugins/telescope.lua b/nvim/.config/nvim/lua/plugins/telescope.lua deleted file mode 100644 index d6c80f2..0000000 --- a/nvim/.config/nvim/lua/plugins/telescope.lua +++ /dev/null @@ -1,76 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - dependencies = { - { - "nvim-telescope/telescope-fzf-native.nvim", - build = "make", - }, - { - "nvim-telescope/telescope-file-browser.nvim", - dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }, - }, - }, - - keys = { - -- add a keymap to browse plugin files - -- stylua: ignore - { - "fp", - function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end, - desc = "Find Plugin File", - }, - - { - "n", - "", - function() - require("telescope.builtin").find_files({ - prompt_title = "Find Files", - cwd = vim.fn.expand("%:p:h"), - hidden = true, - file_ignore_patterns = { - ".git/", - "node_modules/", - "vendor/", - "dist/", - "public", - "build", - ".next/", - ".turbo/", - ".wrangler/", - }, - }) - end, - }, - }, - -- change some options - opts = { - defaults = { - layout_strategy = "horizontal", - layout_config = { prompt_position = "top" }, - sorting_strategy = "ascending", - winblend = 0, - -- Disable treesitter highlighting - preview = { - treesitter = false, - }, - }, - extensions = { - fzf = { - fuzzy = true, - override_generic_sorter = true, - override_file_sorter = true, - case_mode = "smart_case", - }, - }, - }, - -- Add config function to load extensions - config = function(_, opts) - require("telescope").setup(opts) - - -- Load fzf extension with error handling - pcall(function() - require("telescope").load_extension("fzf") - end) - end, -} diff --git a/nvim/.config/nvim/stylua.toml b/nvim/.config/nvim/stylua.toml deleted file mode 100644 index 6fd9db6..0000000 --- a/nvim/.config/nvim/stylua.toml +++ /dev/null @@ -1,2 +0,0 @@ -indent_width = 2 -column_width = 120 diff --git a/op/.config/op/config b/op/.config/op/config deleted file mode 100644 index cb49ca4..0000000 --- a/op/.config/op/config +++ /dev/null @@ -1,16 +0,0 @@ -{ - "latest_signin": "my", - "device": "vjp35zja3bsmrurdxmt2a3mqh4", - "accounts": [ - { - "shorthand": "my", - "accountUUID": "op://Private/op-config/Section_2qnawlzyot3gxlqpxuwjxnmcou/accountuuid", - "url": "https://my.1password.ca", - "email": "op://Private/21 Lawlor/Identification/email", - "accountKey": "op://Private/op-config/Section_2qnawlzyot3gxlqpxuwjxnmcou/accountkey", - "userUUID": "op://Private/op-config/Section_2qnawlzyot3gxlqpxuwjxnmcou/useruuid", - "dsecret": "op://Private/op-config/Section_2qnawlzyot3gxlqpxuwjxnmcou/dsecret" - } - ], - "system_auth_latest_signin": "2CB2QOTSLZFGVIKE3D3B4JRMPI" -} \ No newline at end of file diff --git a/verdaccio/.config/verdaccio/config.yaml b/verdaccio/.config/verdaccio/config.yaml deleted file mode 100644 index fa5de1a..0000000 --- a/verdaccio/.config/verdaccio/config.yaml +++ /dev/null @@ -1,201 +0,0 @@ -# -# This is the default configuration file. It allows all users to do anything, -# please read carefully the documentation and best practices to -# improve security. -# -# Look here for more config file examples: -# https://github.com/verdaccio/verdaccio/tree/6.x/conf -# -# Read about the best practices -# https://verdaccio.org/docs/best - -# path to a directory with all packages -storage: /Users/jenc/.local/share/verdaccio/storage -# path to a directory with plugins to include -plugins: ./plugins - -# https://verdaccio.org/docs/webui -web: - title: Verdaccio - # comment out to disable gravatar support - # gravatar: false - # by default packages are ordercer ascendant (asc|desc) - # sort_packages: asc - # convert your UI to the dark side - # darkMode: true - # html_cache: true - # by default all features are displayed - login: true - # showInfo: true - # showSettings: true - # In combination with darkMode you can force specific theme - # showThemeSwitch: true - # showFooter: true - # showSearch: true - # showRaw: true - # showDownloadTarball: true - # HTML tags injected after manifest - # scriptsBodyAfter: - # - '' - # HTML tags injected before ends - # metaScripts: - # - '' - # - '' - # - '' - # HTML tags injected first child at - # bodyBefore: - # - '
html before webpack scripts
' - # Public path for template manifest scripts (only manifest) - # publicPath: http://somedomain.org/ - -# https://verdaccio.org/docs/configuration#authentication -auth: - htpasswd: - file: ./htpasswd - # Maximum amount of users allowed to register, defaults to "+inf". - # You can set this to -1 to disable registration. - # max_users: 1000 - # Hash algorithm, possible options are: "bcrypt", "md5", "sha1", "crypt". - # algorithm: bcrypt # by default is crypt, but is recommended use bcrypt for new installations - # Rounds number for "bcrypt", will be ignored for other algorithms. - # rounds: 10 - -# https://verdaccio.org/docs/configuration#uplinks -# a list of other known repositories we can talk to -uplinks: - npmjs: - url: https://registry.npmjs.org/ - -# Learn how to protect your packages -# https://verdaccio.org/docs/protect-your-dependencies/ -# https://verdaccio.org/docs/configuration#packages -packages: - '@*/*': - # scoped packages - access: $all - publish: $authenticated - unpublish: $authenticated - proxy: npmjs - - '**': - # allow all users (including non-authenticated users) to read and - # publish all packages - # - # you can specify usernames/groupnames (depending on your auth plugin) - # and three keywords: "$all", "$anonymous", "$authenticated" - access: $all - - # allow all known users to publish/publish packages - # (anyone can register by default, remember?) - publish: $authenticated - unpublish: $authenticated - - # if package is not available locally, proxy requests to 'npmjs' registry - proxy: npmjs - -# To improve your security configuration and avoid dependency confusion -# consider removing the proxy property for private packages -# https://verdaccio.org/docs/best#remove-proxy-to-increase-security-at-private-packages - -# https://verdaccio.org/docs/configuration#server -# You can specify HTTP/1.1 server keep alive timeout in seconds for incoming connections. -# A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout. -# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough. -server: - keepAliveTimeout: 60 - # Allow `req.ip` to resolve properly when Verdaccio is behind a proxy or load-balancer - # See: https://expressjs.com/en/guide/behind-proxies.html - # trustProxy: '127.0.0.1' - -# https://verdaccio.org/docs/configuration#offline-publish -# publish: -# allow_offline: false - -# https://verdaccio.org/docs/configuration#url-prefix -# url_prefix: /verdaccio/ -# VERDACCIO_PUBLIC_URL='https://somedomain.org'; -# url_prefix: '/my_prefix' -# // url -> https://somedomain.org/my_prefix/ -# VERDACCIO_PUBLIC_URL='https://somedomain.org'; -# url_prefix: '/' -# // url -> https://somedomain.org/ -# VERDACCIO_PUBLIC_URL='https://somedomain.org/first_prefix'; -# url_prefix: '/second_prefix' -# // url -> https://somedomain.org/second_prefix/' - -# https://verdaccio.org/docs/configuration#security -# security: -# api: -# legacy: true -# # recomended set to true for older installations -# migrateToSecureLegacySignature: true -# jwt: -# sign: -# expiresIn: 29d -# verify: -# someProp: [value] -# web: -# sign: -# expiresIn: 1h # 1 hour by default -# verify: -# someProp: [value] - -# https://verdaccio.org/docs/configuration#user-rate-limit -# userRateLimit: -# windowMs: 50000 -# max: 1000 - -# https://verdaccio.org/docs/configuration#max-body-size -max_body_size: 10mb - -# https://verdaccio.org/docs/configuration#listen-port -# listen: -# - localhost:4873 # default value -# - http://localhost:4873 # same thing -# - 0.0.0.0:4873 # listen on all addresses (INADDR_ANY) -# - https://example.org:4873 # if you want to use https -# - "[::1]:4873" # ipv6 -# - unix:/tmp/verdaccio.sock # unix socket - -# The HTTPS configuration is useful if you do not consider use a HTTP Proxy -# https://verdaccio.org/docs/configuration#https -# https: -# key: ./path/verdaccio-key.pem -# cert: ./path/verdaccio-cert.pem -# ca: ./path/verdaccio-csr.pem - -# https://verdaccio.org/docs/configuration#proxy -# http_proxy: http://something.local/ -# https_proxy: https://something.local/ - -# https://verdaccio.org/docs/configuration#notifications -# notify: -# method: POST -# headers: [{ "Content-Type": "application/json" }] -# endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken -# content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}' - -middlewares: - audit: - enabled: true - -# https://verdaccio.org/docs/logger -# log settings -log: { type: stdout, format: pretty, level: http } -#experiments: -# # support for npm token command -# token: false -# # disable writing body size to logs, read more on ticket 1912 -# bytesin_off: false -# # enable tarball URL redirect for hosting tarball with a different server, the tarball_url_redirect can be a template string -# tarball_url_redirect: 'https://mycdn.com/verdaccio/${packageName}/${filename}' -# # the tarball_url_redirect can be a function, takes packageName and filename and returns the url, when working with a js configuration file -# tarball_url_redirect(packageName, filename) { -# const signedUrl = // generate a signed url -# return signedUrl; -# } - -# translate your registry, api i18n not available yet -# i18n: -# list of the available translations https://github.com/verdaccio/verdaccio/blob/master/packages/plugins/ui-theme/src/i18n/ABOUT_TRANSLATIONS.md -# web: en-US diff --git a/vim/.vimrc b/vim/.vimrc deleted file mode 100644 index 462a04f..0000000 --- a/vim/.vimrc +++ /dev/null @@ -1,10 +0,0 @@ -# enable modern features -set nocompatible - -# arrow keys should work in insert mode -inoremap k -inoremap j -inoremap h -inoremap l -# map command s to save file -imap :wa diff --git a/yarn/.yarnrc b/yarn/.yarnrc deleted file mode 100644 index 1b7b952..0000000 --- a/yarn/.yarnrc +++ /dev/null @@ -1,5 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -lastUpdateCheck 1745961778541 diff --git a/zprofile/.zprofile b/zprofile/.zprofile deleted file mode 100644 index 91cb09c..0000000 --- a/zprofile/.zprofile +++ /dev/null @@ -1,29 +0,0 @@ - -# Only run if command exists (faster) -[ -x /opt/homebrew/bin/brew ] && eval "$(/opt/homebrew/bin/brew shellenv)" -command -v direnv >/dev/null 2>&1 && eval "$(direnv hook zsh)" -command -v pyenv >/dev/null 2>&1 && eval "$(pyenv init -)" - -# Show all filename extensions in Finder -defaults write NSGlobalDomain AppleShowAllExtensions -bool true - -# Set screenshot location -defaults write com.apple.screencapture "location" -string "~/pictures/screenshots" - -# don't create .DS_Store files on network volumes -defaults write com.apple.desktopservices DSDontWriteNetworkStores true -# don't create .DS_Store files on USB volumes -defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true -# show hidden files in Finder by default -defaults write com.apple.finder AppleShowAllFiles YES - - -# Mise uses shims to load dev tools into the PATH -# https://mise.jdx.dev/dev-tools/shims.html#mise-activate-shims -eval "$(mise activate zsh --shims)" -# Added by OrbStack: command-line tools and integration -# This won't be added again if you remove it. -[ -f ~/.orbstack/shell/init.zsh ] && source ~/.orbstack/shell/init.zsh 2>/dev/null || : - -# Load secrets to use anywhere in the filesystem -source $HOME/.dotfiles/.env.secret diff --git a/zprofile/.zprofile.pysave b/zprofile/.zprofile.pysave deleted file mode 100644 index f0193f7..0000000 --- a/zprofile/.zprofile.pysave +++ /dev/null @@ -1,2 +0,0 @@ -virtualenv venv --python=/usr/local/bin/python -export PATH diff --git a/zsh/.osx_aliasrc b/zsh/.osx_aliasrc deleted file mode 100644 index e62418d..0000000 --- a/zsh/.osx_aliasrc +++ /dev/null @@ -1,116 +0,0 @@ -## OSX aliases -# python -alias python='python3' -alias pip='pip3' - -# git -alias g='git' - -# Make files untracked by git -# example: assume -alias assume='git update-index --assume-unchanged' - -# example: unassume -alias unassume='git update-index --no-assume-unchanged' -alias reload='source ~/.zshrc' - -# editors/code assistants -alias vi='nvim' -alias cursor='/Applications/Cursor.app/Contents/Resources/app/bin/cursor' -# Ollama aliases -alias ol='ollama' -alias olcode='ollama run codellama:7b' -alias 'ol ls'='ollama list' -alias 'ol upgrade'='brew upgrade ollama' - -# databases -alias mysql='/opt/homebrew/bin/mysql' -alias mysqladmin='/opt/homebrew/bin/mysqladmin' - -# ssh -# If you need a username, use: alias thingymachine='ssh user@68.183.204.78' -alias thingymachine='ssh 68.183.204.78' -alias expose='../script/expose.sh' - -# shell aliases -alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app' -alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app' - -alias zshconfig='mate ~/.zshrc' - -# brew -alias brewup='brew update; brew upgrade; brew prune; brew cleanup; brew doctor' - -# package management -# pnpm -alias p='pnpm' - -# php / Laravel -alias composer='php /usr/local/bin/composer.phar' -alias sail='[ -f sail ] && zsh sail || zsh vendor/bin/sail' -alias pint='./vendor/bin/pint' - -# nektos/act -alias act='act --container-architecture linux/amd64' - -# kubernetes -alias k='kubectl' - -# Functions for common tasks - -## Ollama functions - -# Example: ask 'What is the capital of France?' -function ask() { - printf '%s\n' "$1" | ollama run llama3.2 -} - -# Example: review -function review() { - cat "$1" | ollama run codellama 'Review this code for bugs and improvements:' -} - -# Example: translate 'Hello' 'French' -function translate() { - printf '%s\n' "$1" | ollama run llama3.2 "Translate to $2:" -} - -# Model management -# olshow -# Example: olshow 'llama3.2' -function olshow() { - ollama show "$1" -} - -function model_size() { - du -sh ~/.ollama/models/* 2>/dev/null || echo "No models found at ~/.ollama/models" -} - -# nvm / node -# Define as a function so $NVM_DIR expands correctly -get-nvm() { - if [ -n "$NVM_DIR" ]; then - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" - else - echo "NVM_DIR is not set" - fi -} - -# OS X specific aliases -# delete .DS_Store files from a directory path -# usage: delete_ds -delete_ds(){ - # list files to be deleted - echo -e "This will delete all .DS_Store files from $1 and its subdirectories.\n" - find "$1" -name '.DS_Store' -print - echo 'Are you sure? (y/n)' - read -r answer - if [[ $answer != y ]]; then - echo 'Aborting.' - return - else - echo "Deleting .DS_Store files from $1..." - find "$1" -name '.DS_Store' -delete -print - fi -} diff --git a/zsh/.zshenv b/zsh/.zshenv deleted file mode 100644 index c2fdbbe..0000000 --- a/zsh/.zshenv +++ /dev/null @@ -1,8 +0,0 @@ -. "$HOME/.cargo/env" - -# don't create .DS_Store files on network volumes -defaults write com.apple.desktopservices DSDontWriteNetworkStores true -# don't create .DS_Store files on USB volumes -defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true -# show hidden files in Finder by default -defaults write com.apple.finder AppleShowAllFiles YES diff --git a/zsh/.zshrc b/zsh/.zshrc deleted file mode 100644 index 19fa71c..0000000 --- a/zsh/.zshrc +++ /dev/null @@ -1,128 +0,0 @@ -# OPENSPEC:START -# OpenSpec shell completions configuration -fpath=("/Users/jenc/.oh-my-zsh/custom/completions" $fpath) -autoload -Uz compinit -compinit -# OPENSPEC:END - -# If not running interactively, don't do anything -[ -z "$PS1" ] && return - -# ---- theme ---- -export PROMPT='~🧻 ' -export ZSH_THEME="robbyrussell" - -# Uncomment the following line to change how often to auto-update (in days). -zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -DISABLE_UNTRACKED_FILES_DIRTY="true" - -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -HIST_STAMPS="yyyy-mm-dd" - -# ---- Plugins ---- -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -plugins=(git 1password gh zsh-autosuggestions zsh-autocomplete direnv) - -# Set ZSH path before sourcing oh-my-zsh -# ZSH must point to the oh-my-zsh installation directory -export ZSH="$HOME/.oh-my-zsh" - -# ZSH_CUSTOM points to custom plugins/aliases (managed via stow) -export ZSH_CUSTOM="$HOME/.oh-my-zsh/custom" -# Load oh-my-zsh -source "$ZSH/oh-my-zsh.sh" -export NVM_DIR="$HOME/.nvm" - -# ---- User configuration -------- - -# Preferred editor for local and remote sessions - if [[ -n $SSH_CONNECTION ]]; then - echo "πŸ”’ SSH connection detected" - else - export EDITOR='nvim' - fi - -# ------- aliases -------- -# Overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. - - -# use iterm2 on zsh init -source ~/.iterm2_shell_integration.zsh - -# mysql -export PKG_CONFIG_PATH="/usr/local/opt/mysql-client/lib/pkgconfig" -export PATH="/usr/local/opt/mysql-client/bin:$PATH" -# Docker CLI completions. -fpath=(/Users/jenc/.docker/completions $fpath) - -# SSH agent socket for 1Password integration -export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock - -# devbox called only when `devbox` is typed -devbox() { - unfunction devbox - eval "$(command devbox global shellenv --preserve-path-stack -r)" - command devbox "$@" -} - -# Only start ssh-agent if not already running -if [ -z "$SSH_AUTH_SOCK" ]; then - eval "$(ssh-agent -s)" > /dev/null -fi - -# Add SSH key to agent with macOS keychain support -# This will prompt for passphrase once, then store it in macOS keychain -# Check if key is already in agent to avoid repeated prompts -if ! ssh-add -l 2>/dev/null | grep -q "id_ed25519"; then - ssh-add --apple-use-keychain ~/.ssh/id_ed25519 2>/dev/null || true - ssh-add --apple-use-keychain ~/.ssh/id_rsa 2>/dev/null || true -fi - -# pnpm -export PNPM_HOME="/Users/jenc/Library/pnpm" -case ":$PATH:" in - *":$PNPM_HOME:"*) ;; - *) export PATH="$PNPM_HOME:$PATH" ;; -esac -# pnpm end -# uv -eval "$(uv generate-shell-completion zsh)" -export PATH="$HOME/.local/bin:$PATH" -# ------------ Paths ------------ - -# mysql if using mysql -if [[ -f /opt/homebrew/opt/mysql/bin/mysql ]]; then - export PATH="/opt/homebrew/opt/mysql/bin:$PATH" - export PATH="/opt/homebrew/opt/mysql@8.0/bin:$PATH" - export PATH="/opt/homebrew/opt/mysql@8.4/bin:$PATH" - export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH" -fi -# add homebrew sbin to path -export PATH="/opt/homebrew/sbin:$PATH" - -# Load fnm (Fast Node Manager) -eval "$(fnm env --use-on-cd)" - -# load aliases -source ~/.osx_aliasrc -# opencode -export PATH=/Users/jenc/.opencode/bin:$PATH From b9accef5042963a7a01e25fb05ef751b229b460e Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:21:58 -0400 Subject: [PATCH 05/27] feat: add Pi-specific zsh config to stow/pi --- stow/pi/zsh/.zshrc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 stow/pi/zsh/.zshrc diff --git a/stow/pi/zsh/.zshrc b/stow/pi/zsh/.zshrc new file mode 100644 index 0000000..62b6498 --- /dev/null +++ b/stow/pi/zsh/.zshrc @@ -0,0 +1,19 @@ +# Raspberry Pi-specific zsh configuration +# Inherits from Linux config, add Pi-specific overrides here + +# ---- Source Linux base config ---- +if [ -f "$HOME/.dotfiles/stow/linux/zsh/.zshrc" ]; then + source "$HOME/.dotfiles/stow/linux/zsh/.zshrc" +fi + +# ---- Pi-specific aliases ---- +# Example Pi-specific aliases: +# alias pi-temp='vcgencmd measure_temp' +# alias pi-reboot='sudo reboot' + +# ---- Pi-specific paths ---- +# Add any Pi-specific paths here + +# ---- Hardware-specific ---- +# For Raspberry Pi hardware utilities +# export PATH="$HOME/.local/bin:$PATH" From 20d4c7fd1ee069a6531577c246d7c35302310994 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:24:22 -0400 Subject: [PATCH 06/27] fix: restore direnv config to stow/common/direnv --- stow/common/direnv/.config/direnv/direnvrc | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 stow/common/direnv/.config/direnv/direnvrc diff --git a/stow/common/direnv/.config/direnv/direnvrc b/stow/common/direnv/.config/direnv/direnvrc new file mode 100644 index 0000000..e594bb5 --- /dev/null +++ b/stow/common/direnv/.config/direnv/direnvrc @@ -0,0 +1,61 @@ +echo "πŸš€ Loading global direnvrc..." + +# -------Shell variables ------------ +export EDITOR='nvim' # default editor +# default editor +export EDITOR='nvim' +export SUDOEDITOR='nvim' +export VISUAL='nvim' +export PROMPT='~🧻 ' +# Suppress direnv export output +export DIRENV_LOG_FORMAT="" + +# ---- NodeJS fnm ---- +# Load fnm based on project context +# 1. If a .nvmrc or .node-version file exists β‡’ ensure that version is installed & used. +# 2. Else if a package.json exists β‡’ just source fnm so it's available on-demand. +# +# Sources: +# - https://blog.ffff.lt/posts/direnv-and-nvmrc/ +# - https://github.com/Schniz/fnm + +use_fnm() { + # fnm use automatically detects .nvmrc or .node-version and switches to that version + # It will also install the version if it's not already installed + fnm use +} + +# Initialize fnm if not already initialized +if ! command -v fnm &> /dev/null; then + # Try to source fnm from common locations + if [[ -s "$HOME/.fnm/fnm" ]]; then + eval "$("$HOME/.fnm/fnm" env --use-on-cd)" + elif [[ -s "$HOME/.local/share/fnm/fnm" ]]; then + eval "$("$HOME/.local/share/fnm/fnm" env --use-on-cd)" + fi +fi + +if [[ -f ".nvmrc" ]] || [[ -f ".node-version" ]]; then + # fnm use automatically handles version detection, installation, and switching + use_fnm +elif [[ -f "package.json" ]]; then + # No .nvmrc/.node-version, but JavaScript project detected β†’ just source fnm for convenience + # Ensure fnm is available in PATH + if command -v fnm &> /dev/null; then + echo "✨ fnm available due to package.json (no .nvmrc/.node-version found)." + fi +fi + + +# Auto-source dotfiles .envrc in every directory if not inside dotfiles directory +# or it will load twice +if [[ $PWD != "$HOME/.dotfiles" && -f .git ]]; then + dotenv_if_exists + source_env_if_exists "$HOME/.dotfiles/.envrc" + source_env_if_exists "$HOME/.dotfiles/.env.secret" +fi + +# php composer +if [[ -f composer.json ]]; then + PATH_add vendor/bin +fi From 0d0ded7f61016a1beb360960fb3392e4e81fac2e Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:25:01 -0400 Subject: [PATCH 07/27] feat: add fnm and starship to linux/home.nix - fnm: Node.js version manager (used by direnv config) - starship: Shell prompt (used in original NixOS config) --- linux/home.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/linux/home.nix b/linux/home.nix index 8fc623f..ae4e422 100644 --- a/linux/home.nix +++ b/linux/home.nix @@ -25,7 +25,13 @@ ca-certificates gnupg - # Utilities + # Node.js version manager + fnm + + # Shell prompts + starship + + # Utilities stow tree unzip From a3d88b7f9dffbafa8737093fdde4d92a26c19541 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:26:31 -0400 Subject: [PATCH 08/27] fix: restore LazyVim config to stow/common/nvim - Restore init.lua, lazyvim.json, lua/config/*, lua/plugins/* - Remove .DS_Store files --- stow/common/nvim/.config/nvim/.gitignore | 9 + stow/common/nvim/.config/nvim/.neoconf.json | 16 ++ stow/common/nvim/.config/nvim/LICENSE | 201 ++++++++++++++++++ stow/common/nvim/.config/nvim/README.md | 4 + stow/common/nvim/.config/nvim/init.lua | 2 + stow/common/nvim/.config/nvim/lazy-lock.json | 50 +++++ stow/common/nvim/.config/nvim/lazyvim.json | 19 ++ .../nvim/.config/nvim/lua/config/autocmds.lua | 8 + .../nvim/.config/nvim/lua/config/keymaps.lua | 22 ++ .../nvim/.config/nvim/lua/config/lazy.lua | 144 +++++++++++++ .../nvim/.config/nvim/lua/config/options.lua | 7 + .../nvim/.config/nvim/lua/plugins/laravel.lua | 18 ++ .../.config/nvim/lua/plugins/telescope.lua | 76 +++++++ stow/common/nvim/.config/nvim/stylua.toml | 2 + 14 files changed, 578 insertions(+) create mode 100644 stow/common/nvim/.config/nvim/.gitignore create mode 100644 stow/common/nvim/.config/nvim/.neoconf.json create mode 100644 stow/common/nvim/.config/nvim/LICENSE create mode 100644 stow/common/nvim/.config/nvim/README.md create mode 100644 stow/common/nvim/.config/nvim/init.lua create mode 100644 stow/common/nvim/.config/nvim/lazy-lock.json create mode 100644 stow/common/nvim/.config/nvim/lazyvim.json create mode 100644 stow/common/nvim/.config/nvim/lua/config/autocmds.lua create mode 100644 stow/common/nvim/.config/nvim/lua/config/keymaps.lua create mode 100644 stow/common/nvim/.config/nvim/lua/config/lazy.lua create mode 100644 stow/common/nvim/.config/nvim/lua/config/options.lua create mode 100644 stow/common/nvim/.config/nvim/lua/plugins/laravel.lua create mode 100644 stow/common/nvim/.config/nvim/lua/plugins/telescope.lua create mode 100644 stow/common/nvim/.config/nvim/stylua.toml diff --git a/stow/common/nvim/.config/nvim/.gitignore b/stow/common/nvim/.config/nvim/.gitignore new file mode 100644 index 0000000..64fc731 --- /dev/null +++ b/stow/common/nvim/.config/nvim/.gitignore @@ -0,0 +1,9 @@ +.DS_Store +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data diff --git a/stow/common/nvim/.config/nvim/.neoconf.json b/stow/common/nvim/.config/nvim/.neoconf.json new file mode 100644 index 0000000..361aeaa --- /dev/null +++ b/stow/common/nvim/.config/nvim/.neoconf.json @@ -0,0 +1,16 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": [ + "plenary.nvim" + ] + } + }, + "lspconfig": { + "lua_ls": { + "Lua.runtime.version": "LuaJIT", + "Lua.workspace.checkThirdParty": false + } + } +} diff --git a/stow/common/nvim/.config/nvim/LICENSE b/stow/common/nvim/.config/nvim/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/stow/common/nvim/.config/nvim/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/stow/common/nvim/.config/nvim/README.md b/stow/common/nvim/.config/nvim/README.md new file mode 100644 index 0000000..185280b --- /dev/null +++ b/stow/common/nvim/.config/nvim/README.md @@ -0,0 +1,4 @@ +# πŸ’€ LazyVim + +A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). +Refer to the [documentation](https://lazyvim.github.io/installation) to get started. diff --git a/stow/common/nvim/.config/nvim/init.lua b/stow/common/nvim/.config/nvim/init.lua new file mode 100644 index 0000000..2514f9e --- /dev/null +++ b/stow/common/nvim/.config/nvim/init.lua @@ -0,0 +1,2 @@ +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") diff --git a/stow/common/nvim/.config/nvim/lazy-lock.json b/stow/common/nvim/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..93914b6 --- /dev/null +++ b/stow/common/nvim/.config/nvim/lazy-lock.json @@ -0,0 +1,50 @@ +{ + "LazyVim": { "branch": "main", "commit": "28db03f958d58dfff3c647ce28fdc1cb88ac158d" }, + "SchemaStore.nvim": { "branch": "main", "commit": "fb5f164a28f8fd5a052da512436d4173e06cf71e" }, + "avante.nvim": { "branch": "main", "commit": "7e50de89049ea3540f0d39acec7b68a74a5d1edb" }, + "blink-cmp-avante": { "branch": "master", "commit": "e5a1be4c818520385f95fe2663c04e48f5f0c36a" }, + "blink-copilot": { "branch": "main", "commit": "41e91a659bd9b8cba9ba2ea68a69b52ba5a9ebd8" }, + "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "catppuccin": { "branch": "main", "commit": "cb5665990a797b102715188e73c44c3931b3b42e" }, + "conform.nvim": { "branch": "master", "commit": "3543d000dafbc41cc7761d860cfdb24e82154f75" }, + "copilot.lua": { "branch": "master", "commit": "e78d1ffebdf6ccb6fd8be4e6898030c1cf5f9b64" }, + "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" }, + "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, + "fzf-lua": { "branch": "main", "commit": "47b85a25c0c0b2c20b4e75199ed01bb71e7814f5" }, + "gh.nvim": { "branch": "main", "commit": "6f367b2ab8f9d4a0a23df2b703a3f91137618387" }, + "gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" }, + "grug-far.nvim": { "branch": "main", "commit": "794f03c97afc7f4b03fb6ec5111be507df1850cf" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "lazydev.nvim": { "branch": "main", "commit": "01bc2aacd51cf9021eb19d048e70ce3dd09f7f93" }, + "litee.nvim": { "branch": "main", "commit": "bf366a1414fd0f9401631ac8884f2f9fa4bf18d2" }, + "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, + "markdown-preview.nvim": { "branch": "master", "commit": "9becceee5740b7db6914da87358a183ad11b2049" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "f2fa60409630ec2d24acf84494fb55e1d28d593c" }, + "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, + "mini.ai": { "branch": "main", "commit": "bfb26d9072670c3aaefab0f53024b2f3729c8083" }, + "mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" }, + "mini.pairs": { "branch": "main", "commit": "d5a29b6254dad07757832db505ea5aeab9aad43a" }, + "mini.starter": { "branch": "main", "commit": "8ee6ce6a4c9be47682516908557cc062c4d595a2" }, + "neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, + "noice.nvim": { "branch": "main", "commit": "cf758e9df66451889aab56613a21b8673f045ec2" }, + "nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" }, + "nvim-lint": { "branch": "master", "commit": "1f19dacd945a7b1a57f29f32b2d7168384df3d36" }, + "nvim-lspconfig": { "branch": "master", "commit": "5bfcc89fd155b4ffc02d18ab3b7d19c2d4e246a7" }, + "nvim-treesitter": { "branch": "main", "commit": "99dfc5acefd7728cec4ad0d0a6a9720f2c2896ff" }, + "nvim-treesitter-textobjects": { "branch": "main", "commit": "28a3494c075ef0f353314f627546537e43c09592" }, + "nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" }, + "octo.nvim": { "branch": "master", "commit": "4a3a4fc5a9d3a372c91041f5b846f33b8d6b31fa" }, + "persistence.nvim": { "branch": "main", "commit": "c45ff862b53ce07a853a753fb0b33e148dbb99d2" }, + "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, + "render-markdown.nvim": { "branch": "main", "commit": "6a744f0d14fd1d0fa8e3f446ac7825ec1e351d55" }, + "snacks.nvim": { "branch": "main", "commit": "a4e46becca45eb65c73a388634b1ce8aad629ae0" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "3610dc7dc91f06aa98b11dca5cc30dfa98626b7e" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, + "telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" }, + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, + "tokyonight.nvim": { "branch": "main", "commit": "545d72cde6400835d895160ecb5853874fd5156d" }, + "trouble.nvim": { "branch": "main", "commit": "748ca2789044607f19786b1d837044544c55e80a" }, + "ts-comments.nvim": { "branch": "main", "commit": "79e4337e4231ff8ca33dab85162b5ee8e78f22ce" }, + "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" } +} diff --git a/stow/common/nvim/.config/nvim/lazyvim.json b/stow/common/nvim/.config/nvim/lazyvim.json new file mode 100644 index 0000000..6effbf7 --- /dev/null +++ b/stow/common/nvim/.config/nvim/lazyvim.json @@ -0,0 +1,19 @@ +{ + "extras": [ + "lazyvim.plugins.extras.ai.avante", + "lazyvim.plugins.extras.editor.neo-tree", + "lazyvim.plugins.extras.lang.go", + "lazyvim.plugins.extras.lang.markdown", + "lazyvim.plugins.extras.lang.nix", + "lazyvim.plugins.extras.lang.toml", + "lazyvim.plugins.extras.ui.mini-starter", + "lazyvim.plugins.extras.util.dot", + "lazyvim.plugins.extras.util.gh", + "lazyvim.plugins.extras.util.gitui", + "lazyvim.plugins.extras.util.octo" + ], + "news": { + "NEWS.md": "11866" + }, + "version": 8 +} \ No newline at end of file diff --git a/stow/common/nvim/.config/nvim/lua/config/autocmds.lua b/stow/common/nvim/.config/nvim/lua/config/autocmds.lua new file mode 100644 index 0000000..853071b --- /dev/null +++ b/stow/common/nvim/.config/nvim/lua/config/autocmds.lua @@ -0,0 +1,8 @@ +-- Autocmds are automatically loaded on the VeryLazy event +-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua +-- +-- Add any additional autocmds here +-- with `vim.api.nvim_create_autocmd` +-- +-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults) +-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell") \ No newline at end of file diff --git a/stow/common/nvim/.config/nvim/lua/config/keymaps.lua b/stow/common/nvim/.config/nvim/lua/config/keymaps.lua new file mode 100644 index 0000000..f3c129a --- /dev/null +++ b/stow/common/nvim/.config/nvim/lua/config/keymaps.lua @@ -0,0 +1,22 @@ +-- Keymaps are automatically loaded on the VeryLazy event +-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua +-- Map Command+Shift+P (macOS) or Ctrl+Shift+P (Windows/Linux) to Telescope + +-- macOS-style keybindings + +vim.api.nvim_set_keymap("n", "", "ggVG", { desc = "Select all" }) + +--- Save and append in insert mode -- +vim.keymap.set("i", "", "wa", { desc = "Save" }) + +-- Yank into system clipboard +vim.keymap.set({ "n", "v" }, "y", '"+y') -- yank motion + +-- Paste from system clipboard +vim.keymap.set("n", "p", '"+p') -- paste after cursor + +-- Reload LazyVim configuration +vim.keymap.set("n", "r", function() + vim.cmd("Lazy reload") + vim.cmd("Lazy sync") +end, { desc = "Reload Config" }) diff --git a/stow/common/nvim/.config/nvim/lua/config/lazy.lua b/stow/common/nvim/.config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..b01611c --- /dev/null +++ b/stow/common/nvim/.config/nvim/lua/config/lazy.lua @@ -0,0 +1,144 @@ +---@diagnostic disable: undefined-global +--- evaluates to plugin manager path usually at $HOME/.local/share/lazy/lazy.nvim -- +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +-- Install lazy.nvim if not present +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "--branch=stable", + lazyrepo, + lazypath, + }) + + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end + +-- Add lazy.nvim to runtime path +vim.opt.rtp:prepend(lazypath) + +-- Setup lazy.nvim +return require("lazy").setup({ + spec = { + -- LazyVim core + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + -- Language extras + { import = "lazyvim.plugins.extras.lang.typescript" }, + { import = "lazyvim.plugins.extras.lang.json" }, + -- import/override with custom plugins + { import = "plugins" }, + -- NeoTree + { + "nvim-neo-tree/neo-tree.nvim", + opts = { + filesystem = { + filtered_items = { + hide_hidden = false, + hide_dotfiles = false, + hide_gitignored = true, + hide_ignored = false, -- hide files that are ignored by other gitignore-like files + -- other gitignore-like files, in descending order of precedence. + ignore_files = { + ".neotreeignore", + -- ".rgignore" + }, + }, + commands = { + avante_add_files = function(state) + local node = state.tree:get_node() + local filepath = node:get_id() + local relative_path = require('avante.utils').relative_path(filepath) + + local sidebar = require('avante').get() + + local open = sidebar:is_open() + -- ensure avante sidebar is open + if not open then + require('avante.api').ask() + sidebar = require('avante').get() + end + + sidebar.file_selector:add_selected_file(relative_path) + + -- remove neo tree buffer + if not open then + sidebar.file_selector:remove_selected_file('neo-tree filesystem [1]') + end + end, + }, + window = { + mappings = { + ['oa'] = 'avante_add_files', + }, + }, + }, + }, + }, + -- Treesitter configuration + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "bash", + "html", + "javascript", + "json", + "lua", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "tsx", + "typescript", + "vim", + "yaml", + }, + }, + config = function(_, opts) + vim.list_extend(opts.ensure_installed, { + "tsx", + "typescript", + "go", + }) + end, + }, + }, + defaults = { + lazy = false, + version = "*", + rocks = { + enabled = true, + hererocks = true, + lua = "5.1", + }, + }, + install = { colorscheme = { "catppuccin-macchiato" } }, + checker = { + enabled = true, + notify = true, + }, + performance = { + rtp = { + disabled_plugins = { + "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + "tarPlugin", + "tohtml", + "zipPlugin", + }, + }, + }, +}) diff --git a/stow/common/nvim/.config/nvim/lua/config/options.lua b/stow/common/nvim/.config/nvim/lua/config/options.lua new file mode 100644 index 0000000..1568d3c --- /dev/null +++ b/stow/common/nvim/.config/nvim/lua/config/options.lua @@ -0,0 +1,7 @@ +-- Options are automatically loaded before lazy.nvim startup +-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua +-- vim.g.lazyvim_php_lsp = "intelephense" +vim.g.mapleader = " " +vim.g.autoformat = true +vim.opt.clipboard = "unnamedplus" + diff --git a/stow/common/nvim/.config/nvim/lua/plugins/laravel.lua b/stow/common/nvim/.config/nvim/lua/plugins/laravel.lua new file mode 100644 index 0000000..bc117b9 --- /dev/null +++ b/stow/common/nvim/.config/nvim/lua/plugins/laravel.lua @@ -0,0 +1,18 @@ +return { + -- "adalessa/laravel.nvim", + -- dependencies = { + -- "tpope/vim-dotenv", + -- "nvim-telescope/telescope.nvim", + -- "MunifTanjim/nui.nvim", + -- "kevinhwang91/promise-async", + -- }, + -- cmd = { "Laravel" }, + -- keys = { + -- { "la", ":Laravel artisan" }, + -- { "lr", ":Laravel routes" }, + -- { "lm", ":Laravel related" }, + -- }, + -- event = { "VeryLazy" }, + -- opts = {}, + -- config = false, +} diff --git a/stow/common/nvim/.config/nvim/lua/plugins/telescope.lua b/stow/common/nvim/.config/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..d6c80f2 --- /dev/null +++ b/stow/common/nvim/.config/nvim/lua/plugins/telescope.lua @@ -0,0 +1,76 @@ +return { + "nvim-telescope/telescope.nvim", + dependencies = { + { + "nvim-telescope/telescope-fzf-native.nvim", + build = "make", + }, + { + "nvim-telescope/telescope-file-browser.nvim", + dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }, + }, + }, + + keys = { + -- add a keymap to browse plugin files + -- stylua: ignore + { + "fp", + function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end, + desc = "Find Plugin File", + }, + + { + "n", + "", + function() + require("telescope.builtin").find_files({ + prompt_title = "Find Files", + cwd = vim.fn.expand("%:p:h"), + hidden = true, + file_ignore_patterns = { + ".git/", + "node_modules/", + "vendor/", + "dist/", + "public", + "build", + ".next/", + ".turbo/", + ".wrangler/", + }, + }) + end, + }, + }, + -- change some options + opts = { + defaults = { + layout_strategy = "horizontal", + layout_config = { prompt_position = "top" }, + sorting_strategy = "ascending", + winblend = 0, + -- Disable treesitter highlighting + preview = { + treesitter = false, + }, + }, + extensions = { + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + }, + }, + }, + -- Add config function to load extensions + config = function(_, opts) + require("telescope").setup(opts) + + -- Load fzf extension with error handling + pcall(function() + require("telescope").load_extension("fzf") + end) + end, +} diff --git a/stow/common/nvim/.config/nvim/stylua.toml b/stow/common/nvim/.config/nvim/stylua.toml new file mode 100644 index 0000000..6fd9db6 --- /dev/null +++ b/stow/common/nvim/.config/nvim/stylua.toml @@ -0,0 +1,2 @@ +indent_width = 2 +column_width = 120 From 2117de423f8027a61499dedc53b2793c6f81a80a Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:28:23 -0400 Subject: [PATCH 09/27] fix: restore docker, gh, op configs and remove SSH keys from stow - Restore docker config.json and daemon.json - Restore gh config.yml and hosts.yml - Restore op config - Remove SSH private keys (should not be in git) - Remove lock files and .DS_Store --- stow/common/docker/.docker/config.json | 17 +++++++++++++++++ stow/common/docker/.docker/daemon.json | 9 +++++++++ stow/common/gh/.config/gh/config.yml | 16 ++++++++++++++++ stow/common/gh/.config/gh/hosts.yml | 5 +++++ stow/common/op/.config/op/config | 16 ++++++++++++++++ stow/common/ssh/.ssh/1Password/config | 10 ++++++++++ stow/common/ssh/.ssh/config | 11 +++++++++++ 7 files changed, 84 insertions(+) create mode 100644 stow/common/docker/.docker/config.json create mode 100644 stow/common/docker/.docker/daemon.json create mode 100644 stow/common/gh/.config/gh/config.yml create mode 100644 stow/common/gh/.config/gh/hosts.yml create mode 100644 stow/common/op/.config/op/config create mode 100644 stow/common/ssh/.ssh/1Password/config create mode 100644 stow/common/ssh/.ssh/config diff --git a/stow/common/docker/.docker/config.json b/stow/common/docker/.docker/config.json new file mode 100644 index 0000000..ab0e2f4 --- /dev/null +++ b/stow/common/docker/.docker/config.json @@ -0,0 +1,17 @@ +{ + "auths": { + "https://index.docker.io/v1/": {}, + "https://index.docker.io/v1/access-token": {}, + "https://index.docker.io/v1/refresh-token": {} + }, + "credsStore": "osxkeychain", + "currentContext": "orbstack", + "plugins": { + "-x-cli-hints": { + "enabled": "true" + } + }, + "features": { + "hooks": "true" + } +} \ No newline at end of file diff --git a/stow/common/docker/.docker/daemon.json b/stow/common/docker/.docker/daemon.json new file mode 100644 index 0000000..31d00b7 --- /dev/null +++ b/stow/common/docker/.docker/daemon.json @@ -0,0 +1,9 @@ +{ + "builder": { + "gc": { + "defaultKeepStorage": "20GB", + "enabled": true + } + }, + "experimental": false +} diff --git a/stow/common/gh/.config/gh/config.yml b/stow/common/gh/.config/gh/config.yml new file mode 100644 index 0000000..97cf17c --- /dev/null +++ b/stow/common/gh/.config/gh/config.yml @@ -0,0 +1,16 @@ +# What protocol to use when performing git operations. Supported values: ssh, https +git_protocol: https +# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment. +editor: +# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled +prompt: enabled +# A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager. +pager: +# Aliases allow you to create nicknames for gh commands +aliases: + co: pr checkout +# The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport. +http_unix_socket: +# What web browser gh should use when opening URLs. If blank, will refer to environment. +browser: +version: "1" diff --git a/stow/common/gh/.config/gh/hosts.yml b/stow/common/gh/.config/gh/hosts.yml new file mode 100644 index 0000000..a6c7664 --- /dev/null +++ b/stow/common/gh/.config/gh/hosts.yml @@ -0,0 +1,5 @@ +github.com: + user: usrrname + git_protocol: ssh + users: + usrrname: diff --git a/stow/common/op/.config/op/config b/stow/common/op/.config/op/config new file mode 100644 index 0000000..cb49ca4 --- /dev/null +++ b/stow/common/op/.config/op/config @@ -0,0 +1,16 @@ +{ + "latest_signin": "my", + "device": "vjp35zja3bsmrurdxmt2a3mqh4", + "accounts": [ + { + "shorthand": "my", + "accountUUID": "op://Private/op-config/Section_2qnawlzyot3gxlqpxuwjxnmcou/accountuuid", + "url": "https://my.1password.ca", + "email": "op://Private/21 Lawlor/Identification/email", + "accountKey": "op://Private/op-config/Section_2qnawlzyot3gxlqpxuwjxnmcou/accountkey", + "userUUID": "op://Private/op-config/Section_2qnawlzyot3gxlqpxuwjxnmcou/useruuid", + "dsecret": "op://Private/op-config/Section_2qnawlzyot3gxlqpxuwjxnmcou/dsecret" + } + ], + "system_auth_latest_signin": "2CB2QOTSLZFGVIKE3D3B4JRMPI" +} \ No newline at end of file diff --git a/stow/common/ssh/.ssh/1Password/config b/stow/common/ssh/.ssh/1Password/config new file mode 100644 index 0000000..d6cceac --- /dev/null +++ b/stow/common/ssh/.ssh/1Password/config @@ -0,0 +1,10 @@ +# This config file and the *.pub files in this folder are automatically +# generated and managed by 1Password. Any manual edits to this file or +# any *.pub file will be lost. +# +# You can include this file in your main SSH config by adding the +# following line to your ~/.ssh/config file: +# +# Include ~/.ssh/1Password/config + +Match all diff --git a/stow/common/ssh/.ssh/config b/stow/common/ssh/.ssh/config new file mode 100644 index 0000000..7332b15 --- /dev/null +++ b/stow/common/ssh/.ssh/config @@ -0,0 +1,11 @@ +# Added by OrbStack: 'orb' SSH host for Linux machines +# This only works if it's at the top of ssh_config (before any Host blocks). +# This won't be added again if you remove it. +Include ~/.orbstack/ssh/config + +Host * + AddKeysToAgent yes + UseKeychain yes + IdentityFile ~/.ssh/id_rsa + Include ~/.ssh/1Password/config + IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" \ No newline at end of file From cf942630de640a85f8b9cc902f35ed3e7af5c8ad Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:33:22 -0400 Subject: [PATCH 10/27] feat: add 1Password SSH agent support for Linux - Add 1Password SSH agent configuration to stow/linux/zsh/.zshrc - Add op (1Password CLI) to linux/home.nix packages --- linux/home.nix | 5 ++++- stow/linux/zsh/.zshrc | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/linux/home.nix b/linux/home.nix index ae4e422..90cb38e 100644 --- a/linux/home.nix +++ b/linux/home.nix @@ -25,7 +25,10 @@ ca-certificates gnupg - # Node.js version manager + # 1Password CLI + op + + # Node.js version manager fnm # Shell prompts diff --git a/stow/linux/zsh/.zshrc b/stow/linux/zsh/.zshrc index 6db3371..3c354f8 100644 --- a/stow/linux/zsh/.zshrc +++ b/stow/linux/zsh/.zshrc @@ -21,3 +21,16 @@ export PATH="$HOME/.local/bin:$PATH" # ---- Linux-specific aliases ---- alias ll='ls -la' alias la='ls -a' + +# ---- 1Password SSH Agent ---- +# Enable 1Password SSH agent on Linux +# Requires: op (1Password CLI) and op-ssh-agent +if command -v op &> /dev/null; then + # Set SSH_AUTH_SOCK for 1Password + export SSH_AUTH_SOCK="$HOME/.1Password/agent.sock" + + # Start op-ssh-agent if not running + if [ ! -S "$SSH_AUTH_SOCK" ]; then + op-ssh-agent --startup 2>/dev/null || true + fi +fi From c84d7edfe5d3904b834e0b6af7f3723cef16d6b6 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:37:43 -0400 Subject: [PATCH 11/27] feat: add .profile to stow/common as fallback - Move .profile to stow/common for cross-platform fallback - Provides POSIX-compliant PATH setup for login shells --- stow/common/.profile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 stow/common/.profile diff --git a/stow/common/.profile b/stow/common/.profile new file mode 100644 index 0000000..c2caaae --- /dev/null +++ b/stow/common/.profile @@ -0,0 +1,19 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ]; then + PATH="$HOME/bin:$PATH" +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/.local/bin" ]; then + PATH="$HOME/.local/bin:$PATH" +fi From 2ac1ae686293fa537be55a83c931a154683da892 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:39:13 -0400 Subject: [PATCH 12/27] fix: use aarch64-linux for NixOS (Apple Silicon) - Change nixosConfigurations.system from x86_64-linux to aarch64-linux --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index e88aa0b..20575e9 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,7 @@ outputs = { self, nixpkgs, home-manager, ... }: let systems = { - linux = "x86_64-linux"; + linux = "aarch64-linux"; pi = "aarch64-linux"; }; in @@ -33,7 +33,7 @@ # NixOS configuration (system + home-manager integrated) nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + system = "aarch64-linux"; modules = [ ./hosts/nixos/configuration.nix home-manager.nixosModules.home-manager From f4d0e14a14c5888f58cfb265eeae05b07acd1930 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:40:43 -0400 Subject: [PATCH 13/27] docs: update README with Nix/home-manager setup instructions - Add supported systems table - Add quick start for each OS (NixOS, Linux, macOS) - Document package management approach - Explain stow directory structure - Add troubleshooting section --- README.md | 251 ++++++++++++++++++++++++++---------------------------- 1 file changed, 121 insertions(+), 130 deletions(-) diff --git a/README.md b/README.md index 6f7f266..d33a783 100644 --- a/README.md +++ b/README.md @@ -1,203 +1,194 @@ # dotfiles -[![Built with Devbox](https://www.jetify.com/img/devbox/shield_moon.svg)](https://www.jetify.com/devbox/docs/contributor-quickstart/) +Dotfiles setup with: +- [stow](https://www.gnu.org/software/stow/) - Dotfile symlinking +- [Nix](https://nixos.org/) + [Home Manager](https://nix-community.github.io/home-manager/) - Package management +- [direnv](https://direnv.net) - Environment variable management -Dotfiles setup made with: -- [stow](https://www.gnu.org/software/stow/) +## Supported Systems -- [direnv](https://direnv.net) w/ global config in `~/.config/direnv/direnvrc` +| System | Package Manager | Dotfiles | +|--------|---------------|----------| +| **NixOS** | Nix (flake) | stow | +| **Linux/Debian** | Home Manager | stow | +| **Raspberry Pi** | Home Manager | stow | +| **macOS** | Homebrew | stow | -- Underlying ideals from [12 Factor App config](https://12factor.net/config) +--- ## Quick Start -The setup script automatically detects your operating system and runs the appropriate installer. +### 1. Clone the Repository -**No special requirements** - works with standard shells on supported systems. +```bash +git clone https://github.com/yourusername/dotfiles.git ~/.dotfiles +cd ~/.dotfiles +``` + +### 2. Install Packages -**Supported Systems:** -- [macOS setup](setup-osx.md) based on [mac.install.guide](https://mac.install.guide/) tested with [Bats](https://github.com/bats-core/bats-core) (see [setup-osx.md](setup-osx.md)) -- [Raspberry Pi 4 setup](setup-pi.md) running Debian Trixie -- **NixOS** - Package management via `/etc/nixos/configuration.nix` (setup script provides guidance, stow script works normally) +#### NixOS ```bash -# Install packages (auto-detects OS) -./setup.sh +# Enable flakes (if not already enabled) +mkdir -p ~/.config/nix +echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf -# Check package status -./setup.sh check +# Apply configuration (includes Home Manager automatically) +sudo nixos-rebuild switch --flake .#nixos +``` -# List all packages -./setup.sh list +#### Linux (Debian/Ubuntu/Raspberry Pi) -# Validate package configuration (macOS only) -./setup.sh validate -``` +```bash +# Install Nix (single-user) +sh <(curl -L https://nixos.org/nix/install) --no-daemon -The script will automatically: -- **macOS**: Run `scripts/setup-osx.sh` (uses Homebrew) -- **Linux (Debian/Ubuntu)**: Run `scripts/setup-linux.sh` (uses APT) -- **NixOS**: Shows guidance (package management via configuration.nix) +# Enable flakes +mkdir -p ~/.config/nix +echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf -You can still run the OS-specific scripts directly if needed: -- `./scripts/setup-osx.sh` for macOS -- `./scripts/setup-linux.sh` for Linux +# Apply configuration +home-manager switch --flake .#linux -### Symlinking Dotfiles +# For Raspberry Pi (aarch64) +home-manager switch --flake .#pi +``` -After installing packages, symlink your dotfiles using the OS-aware stow script: +#### macOS ```bash -# Stow all dotfiles (auto-detects OS and only stows relevant packages) -./stow-dotfiles.sh +# Install Nix via Homebrew +brew install nix -# Stow without adopting existing files (use if starting fresh) -./stow-dotfiles.sh "" -``` +# Enable flakes +mkdir -p ~/.config/nix +echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf -The script automatically: -- **Stows common packages** on all systems (bash, zsh, nvim, git, etc.) -- **Stows macOS-specific packages** on macOS only (see [setup-osx.md](setup-osx.md) for details) -- **Skips OS-specific packages** on other systems (e.g., Raspberry Pi won't get macOS packages) -- **Note**: The `nix/` folder is not stowed automatically - it should be managed manually or via NixOS `configuration.nix` +# Apply Home Manager (optional - can also use brew) +home-manager switch --flake .#darwin -### Updating Dotfiles +# Or use Homebrew for packages +./setup.sh +``` -After pulling updates from the repository, use the update script to sync everything: +### 3. Link Dotfiles ```bash -# Pull updates, update submodules, install new packages, and update symlinks -./update.sh +# Stow dotfiles (auto-detects OS) +./stow-dotfiles.sh ``` -This will: -1. Pull latest changes from git -2. Update git submodules -3. Install any new packages (setup scripts check if already installed) -4. Update dotfile symlinks (stow is idempotent, safe to run multiple times) - -## Troubleshooting - -- **Check distribution detection**: `./setup.sh check` -- **List packages**: `./setup.sh list` -- **Dry run setup**: `DRY_RUN=true ./setup.sh` -- **Verify symlinks**: `ls -la ~ | grep "\->"` -- **macOS-specific**: See [setup-osx.md](setup-osx.md) for additional troubleshooting +--- -### Contents -- [dotfiles](#dotfiles) - - [Quick Start](#quick-start) - - [Symlinking Dotfiles](#symlinking-dotfiles) - - [Updating Dotfiles](#updating-dotfiles) - - [Troubleshooting](#troubleshooting) - - [Contents](#contents) - - [Maintenance](#maintenance) - - [act](#act) - - [Symlinking](#symlinking) - - [Nvim/LazyVim](#nvimlazyvim) - - [1Password](#1password) - - [Devbox](#devbox) +## Package Management +### Nix/Home Manager (Linux/NixOS/RPi) -## Maintenance +Packages are defined in: +- `linux/home.nix` - Main package list +- `flake.nix` - NixOS configuration -Keep submodules updated +To add packages, edit `linux/home.nix`: -```bash -git submodule update +```nix +home.packages = with pkgs; [ + git + curl + wget + neovim + # add more packages here +]; ``` -## act +### Homebrew (macOS) ```bash -# insert 1password token into github action secrets -act -s GITHUB_TOKEN=$(op read $GITHUB_TOKEN) +# Add packages to setup-osx.md or use brew directly +brew install ``` -## Symlinking +--- + +## Stow Directory Structure -```bash -./stow-dotfiles.sh +``` +stow/ +β”œβ”€β”€ common/ # Shared across all OSes (bash, git, nvim, etc.) +β”œβ”€β”€ macos/ # macOS-specific (zsh, cursor, iterm2, etc.) +β”œβ”€β”€ linux/ # Linux-specific (zsh config) +└── pi/ # Raspberry Pi-specific (zsh config) ``` -**Manual stow** (if you need to stow individual packages): +The `stow-dotfiles.sh` script automatically stows the correct packages for your OS. -```bash -cp -mkdir -p -stow -``` +--- -## Nvim/LazyVim +## Updating -Build plugins +### Pull Updates ```bash -nvim --headless -c "Lazy sync" -c "qa" -``` +git pull -Force clean and reinstall LazyVim plugins +# Rebuild Nix configurations +home-manager switch --flake .#linux -```bash -nvim --headless -c "lua require('lazy').clean()" -c "lua require('lazy').sync()" -c "qa" +# Re-stow dotfiles +./stow-dotfiles.sh ``` -Refresh and sync plugins (interactive) +--- -```bash -:Lazy clean -:Lazy sync -``` -## 1Password +## Troubleshooting -```bash -op:////[section-name/] -``` +### Nix/Home Manager ```bash -Usage: op read [flags] +# Check what's installed +home-manager packages -Examples: +# Dry-run (see changes without applying) +home-manager switch --flake .#linux --dry-run -Print the secret saved in the field 'password', on the item 'db', in the vault 'app-prod': - -op read op://app-prod/db/password +# List available packages +nix search nixpkgs +``` -Use a secret reference with a query parameter to retrieve a one-time -password: +### Stow -op read "op://app-prod/db/one-time password?attribute=otp" +```bash +# Verify symlinks +ls -la ~ | grep "\->" -Use a secret reference with a query parameter to get an SSH key's private key in the OpenSSH format: +# Restow specific package +stow -R +``` -op read "op://app-prod/ssh key/private key?ssh-format=openssh" +--- -Save the SSH key found on the item 'ssh' in the 'server' vault -as a new file 'key.pem' on your computer: +## Additional Tools -op read --out-file ./key.pem op://app-prod/server/ssh/key.pem +### LazyVim -Use 'op read' in a command with secret references in place of plaintext secrets: +```bash +# Build plugins +nvim --headless -c "Lazy sync" -c "qa" -docker login -u $(op read op://prod/docker/username) -p $(op read op://prod/docker/password) - +# Clean and reinstall +nvim --headless -c "lua require('lazy').clean()" -c "lua require('lazy').sync()" -c "qa" ``` -## Devbox - -[FAQ](https://www.jetify.com/docs/devbox/faq/) +### 1Password CLI ```bash -devbox add # add a package to the devbox environment -devbox rm # remove a package from the devbox environment -devbox info # show info about the devbox environment -devbox update # update packages in devbox -devbox version update # update devbox to the latest version -devbox shell # initialize the devbox shell -devbox generate direnv # generate a direnvrc file +# Read secret +op read op://vault/item/field ``` -Clean up packages in nix store + +### Devbox ```bash -devbox run -- nix store gc --extra-experimental-features nix-command -``` \ No newline at end of file +devbox add +devbox shell +``` From 8de9f4a7ffb24cf29638eda718e682cc4d247db4 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:42:06 -0400 Subject: [PATCH 14/27] refactor: remove .profile from root (now in stow/common) --- .profile | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .profile diff --git a/.profile b/.profile deleted file mode 100644 index c2caaae..0000000 --- a/.profile +++ /dev/null @@ -1,19 +0,0 @@ -# ~/.profile: executed by the command interpreter for login shells. -# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login -# exists. -# see /usr/share/doc/bash/examples/startup-files for examples. -# the files are located in the bash-doc package. - -# the default umask is set in /etc/profile; for setting the umask -# for ssh logins, install and configure the libpam-umask package. -#umask 022 - -# set PATH so it includes user's private bin if it exists -if [ -d "$HOME/bin" ]; then - PATH="$HOME/bin:$PATH" -fi - -# set PATH so it includes user's private bin if it exists -if [ -d "$HOME/.local/bin" ]; then - PATH="$HOME/.local/bin:$PATH" -fi From 7041e2ed8720931784900d759c1269d805293889 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 13:43:54 -0400 Subject: [PATCH 15/27] ci: add GitHub Actions workflows for testing Nix/stow configurations - nix.yml: Tests flake evaluation, home-manager builds for Linux and Pi - stow.yml: Verifies stow package structure --- .github/workflows/nix.yml | 60 ++++++++++++++++++++++++++++++++++++++ .github/workflows/stow.yml | 59 +++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 .github/workflows/nix.yml create mode 100644 .github/workflows/stow.yml diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml new file mode 100644 index 0000000..3a59eed --- /dev/null +++ b/.github/workflows/nix.yml @@ -0,0 +1,60 @@ +name: Nix CI + +on: + push: + branches: [main, nix-migration] + pull_request: + branches: [main] + +jobs: + flake-check: + name: Flake Check + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Nix + uses: ./.github/actions/setup-nix + + - name: Check Flake + run: nix flake check + + home-manager-linux: + name: Home Manager (Linux) + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Nix + uses: ./.github/actions/setup-nix + + - name: Build Home Manager (Linux) + run: home-manager build .#linux --show-trace + + home-manager-pi: + name: Home Manager (RPi/aarch64) + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Nix + uses: ./.github/actions/setup-nix + + - name: Build Home Manager (Pi/aarch64) + run: home-manager build .#pi --show-trace + + nixos: + name: NixOS Config Check + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Nix + uses: ./.github/actions/setup-nix + + - name: Evaluate NixOS Config + run: nix eval .#nixosConfigurations.nixos.pkgs.system diff --git a/.github/workflows/stow.yml b/.github/workflows/stow.yml new file mode 100644 index 0000000..25f2b64 --- /dev/null +++ b/.github/workflows/stow.yml @@ -0,0 +1,59 @@ +name: Stow CI + +on: + push: + branches: [main, nix-migration] + pull_request: + branches: [main] + +jobs: + stow-check: + name: Stow Structure Check + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Stow + run: sudo apt-get update && sudo apt-get install -y stow + + - name: Verify Stow Packages + run: | + # Check that common packages exist and have content + for pkg in stow/common/*; do + if [ -d "$pkg" ]; then + count=$(find "$pkg" -type f | wc -l) + if [ "$count" -eq 0 ]; then + echo "Warning: $pkg is empty" + fi + fi + done + + - name: Verify OS-specific packages + run: | + # Check macOS packages + for pkg in stow/macos/*; do + if [ -d "$pkg" ]; then + count=$(find "$pkg" -type f | wc -l) + echo "macOS package: $(basename $pkg) - $count files" + fi + done + + # Check Linux packages + for pkg in stow/linux/*; do + if [ -d "$pkg" ]; then + count=$(find "$pkg" -type f | wc -l) + echo "Linux package: $(basename $pkg) - $count files" + fi + done + + # Check Pi packages + for pkg in stow/pi/*; do + if [ -d "$pkg" ]; then + count=$(find "$pkg" -type f | wc -l) + echo "Pi package: $(basename $pkg) - $count files" + fi + done From 7be57bd7c8593c47b0596f4b14e076b19eeb294f Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 18:26:49 -0400 Subject: [PATCH 16/27] refactor: extract Nix setup into reusable action - Create .github/actions/setup-nix/action.yml - Use reusable action in nix.yml workflow --- .github/actions/setup-nix/action.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/actions/setup-nix/action.yml diff --git a/.github/actions/setup-nix/action.yml b/.github/actions/setup-nix/action.yml new file mode 100644 index 0000000..8c9f558 --- /dev/null +++ b/.github/actions/setup-nix/action.yml @@ -0,0 +1,20 @@ +name: Setup Nix with Flakes +description: Installs Nix, enables flakes, and installs Home Manager + +runs: + using: composite + steps: + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + + - name: Enable Flakes + shell: bash + run: | + mkdir -p ~/.config/nix + echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf + + - name: Install Home Manager + shell: bash + run: | + nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager + nix-channel --update From 97cf824417c6600a922671347db76876a86e6d9b Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Mon, 16 Mar 2026 18:27:53 -0400 Subject: [PATCH 17/27] refactor: use matrix strategy for home-manager builds - Consolidate home-manager jobs into matrix - Set fail-fast: false to allow other jobs to continue if one fails --- .github/workflows/nix.yml | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 3a59eed..ba40025 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -20,9 +20,17 @@ jobs: - name: Check Flake run: nix flake check - home-manager-linux: - name: Home Manager (Linux) + home-manager: + name: Home Manager (${{ matrix.system }}) runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - system: linux + attr: .#linux + - system: pi + attr: .#pi steps: - name: Checkout uses: actions/checkout@v4 @@ -30,21 +38,8 @@ jobs: - name: Setup Nix uses: ./.github/actions/setup-nix - - name: Build Home Manager (Linux) - run: home-manager build .#linux --show-trace - - home-manager-pi: - name: Home Manager (RPi/aarch64) - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Nix - uses: ./.github/actions/setup-nix - - - name: Build Home Manager (Pi/aarch64) - run: home-manager build .#pi --show-trace + - name: Build Home Manager (${{ matrix.system }}) + run: home-manager build ${{ matrix.attr }} --show-trace nixos: name: NixOS Config Check From 33de54d79ab72fa0422a680f88f9928f8d79b74a Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Tue, 17 Mar 2026 13:46:58 -0400 Subject: [PATCH 18/27] refactor: remove devbox (Nix/Home Manager handles packages now) - Remove devbox.json - Remove devbox.d/ - Remove .devbox/ - Remove devbox.lock Devbox is redundant since Nix/Home Manager manages packages. --- .gitignore | 2 - devbox.json | 34 -- devbox.lock | 884 ------------------------------------------------- linux/home.nix | 4 - setup-pi.md | 3 +- 5 files changed, 1 insertion(+), 926 deletions(-) delete mode 100644 devbox.json delete mode 100644 devbox.lock diff --git a/.gitignore b/.gitignore index f947dd8..c837c1c 100644 --- a/.gitignore +++ b/.gitignore @@ -61,8 +61,6 @@ cache/** # ===================================================================== # Development Tools # ===================================================================== -.devbox/ -devbox.d/ .vscode/** *.vscode .idea/ diff --git a/devbox.json b/devbox.json deleted file mode 100644 index fecea86..0000000 --- a/devbox.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.15.0/.schema/devbox.schema.json", - "packages": [ - "git@latest", - "direnv@latest", - "python@3.10", - "nodejs@latest", - "pnpm@latest", - "yarn@latest", - "docker@latest", - "go@latest", - "iterm2@latest", - "_1password-cli@latest", - "spotify@latest", - "neovim@latest", - "code-cursor@latest", - "mysql@latest", - "oh-my-zsh@latest", - "gh@latest", - "bruno@latest", - "ripgrep@latest" - ], - "shell": { - "init_hook": [ - "export FPATH=\"$(brew --prefix)/share/zsh/site-functions:$FPATH\"", - "autoload -Uz compinit && compinit -i" - ], - "scripts": { - "test": [ - "echo \"Error: no test specified\" && exit 1" - ] - } - } -} \ No newline at end of file diff --git a/devbox.lock b/devbox.lock deleted file mode 100644 index 6e245d4..0000000 --- a/devbox.lock +++ /dev/null @@ -1,884 +0,0 @@ -{ - "lockfile_version": "1", - "packages": { - "_1password-cli@latest": { - "last_modified": "2025-07-13T22:45:35Z", - "resolved": "github:NixOS/nixpkgs/a421ac6595024edcfbb1ef950a3712b89161c359#_1password-cli", - "source": "devbox-search", - "version": "2.31.1", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/g7gzkirv6x4n1cmm2vfrw01rwdzb6siq-1password-cli-2.31.1", - "default": true - } - ], - "store_path": "/nix/store/g7gzkirv6x4n1cmm2vfrw01rwdzb6siq-1password-cli-2.31.1" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/bxamsf9wfd5gvn3811p5rwigl1wfs9vc-1password-cli-2.31.1", - "default": true - } - ], - "store_path": "/nix/store/bxamsf9wfd5gvn3811p5rwigl1wfs9vc-1password-cli-2.31.1" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/l50an4522mdvgc3vpiljl6vhj429y3yz-1password-cli-2.31.1", - "default": true - } - ], - "store_path": "/nix/store/l50an4522mdvgc3vpiljl6vhj429y3yz-1password-cli-2.31.1" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/39ijpzwcdjjmjiq54vpvnbw7a36wbmp5-1password-cli-2.31.1", - "default": true - } - ], - "store_path": "/nix/store/39ijpzwcdjjmjiq54vpvnbw7a36wbmp5-1password-cli-2.31.1" - } - } - }, - "bruno@latest": { - "last_modified": "2025-07-25T08:26:56Z", - "resolved": "github:NixOS/nixpkgs/6027c30c8e9810896b92429f0092f624f7b1aace#bruno", - "source": "devbox-search", - "version": "2.8.0", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/0hpwz9drdygy7j7rdsxhv1lnrzjaggaj-bruno-2.8.0", - "default": true - } - ], - "store_path": "/nix/store/0hpwz9drdygy7j7rdsxhv1lnrzjaggaj-bruno-2.8.0" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/i8f263wya7j8yq8ff2n0hrnhdp79ma71-bruno-2.8.0", - "default": true - } - ], - "store_path": "/nix/store/i8f263wya7j8yq8ff2n0hrnhdp79ma71-bruno-2.8.0" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/zbarnc3l371j5ibkfr7x9v65s9zcdibd-bruno-2.8.0", - "default": true - } - ], - "store_path": "/nix/store/zbarnc3l371j5ibkfr7x9v65s9zcdibd-bruno-2.8.0" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/lzbhv6rmqii8g6dxrif4sqiraqramlaf-bruno-2.8.0", - "default": true - } - ], - "store_path": "/nix/store/lzbhv6rmqii8g6dxrif4sqiraqramlaf-bruno-2.8.0" - } - } - }, - "code-cursor@latest": { - "last_modified": "2025-07-15T16:15:05Z", - "resolved": "github:NixOS/nixpkgs/dab3a6e781554f965bde3def0aa2fda4eb8f1708#code-cursor", - "source": "devbox-search", - "version": "1.2.2", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/mdwh1hkzgqib6kj3xkjzaf3rhd2gh2wm-cursor-1.2.2", - "default": true - } - ], - "store_path": "/nix/store/mdwh1hkzgqib6kj3xkjzaf3rhd2gh2wm-cursor-1.2.2" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/fqzm8jw4gakpfbamb4kqjv44zfjsn9xr-cursor-1.2.2", - "default": true - } - ], - "store_path": "/nix/store/fqzm8jw4gakpfbamb4kqjv44zfjsn9xr-cursor-1.2.2" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/7izgpm9ia5y4xl4n73xz6fz5dzn5slrh-cursor-1.2.2", - "default": true - } - ], - "store_path": "/nix/store/7izgpm9ia5y4xl4n73xz6fz5dzn5slrh-cursor-1.2.2" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/b0z6lbz2qjfigd8y8x3mz6pvdn7036jk-cursor-1.2.2", - "default": true - } - ], - "store_path": "/nix/store/b0z6lbz2qjfigd8y8x3mz6pvdn7036jk-cursor-1.2.2" - } - } - }, - "direnv@latest": { - "last_modified": "2025-07-21T09:58:03Z", - "resolved": "github:NixOS/nixpkgs/2baf8e1658cba84a032c3a8befb1e7b06629242a#direnv", - "source": "devbox-search", - "version": "2.37.1", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/2yxm2j7kwmjvvjph8x2mmfhmzhaj1y5c-direnv-2.37.1", - "default": true - } - ], - "store_path": "/nix/store/2yxm2j7kwmjvvjph8x2mmfhmzhaj1y5c-direnv-2.37.1" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/8dfqhbnfc65fv4rxpjp2knvsc0c2h7f7-direnv-2.37.1", - "default": true - } - ], - "store_path": "/nix/store/8dfqhbnfc65fv4rxpjp2knvsc0c2h7f7-direnv-2.37.1" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/sl2ay9dwylk2nvyxsg2kpcclhahgzhnb-direnv-2.37.1", - "default": true - } - ], - "store_path": "/nix/store/sl2ay9dwylk2nvyxsg2kpcclhahgzhnb-direnv-2.37.1" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/cayixg88lflclgcwjlc21bih648in6ff-direnv-2.37.1", - "default": true - } - ], - "store_path": "/nix/store/cayixg88lflclgcwjlc21bih648in6ff-direnv-2.37.1" - } - } - }, - "docker@latest": { - "last_modified": "2025-07-15T16:15:05Z", - "resolved": "github:NixOS/nixpkgs/dab3a6e781554f965bde3def0aa2fda4eb8f1708#docker", - "source": "devbox-search", - "version": "28.3.2", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/hwnwd8mdzpk1gahv35lni2m667zqr1rg-docker-28.3.2", - "default": true - } - ], - "store_path": "/nix/store/hwnwd8mdzpk1gahv35lni2m667zqr1rg-docker-28.3.2" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/3yr6ry22vlh1jpqidri13328rnivw887-docker-28.3.2", - "default": true - } - ], - "store_path": "/nix/store/3yr6ry22vlh1jpqidri13328rnivw887-docker-28.3.2" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/xxdljnqxc58z32mmaahrh7l8qnkpa3sv-docker-28.3.2", - "default": true - } - ], - "store_path": "/nix/store/xxdljnqxc58z32mmaahrh7l8qnkpa3sv-docker-28.3.2" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/r81s03afqkm0wfys32xw0x90ygw2mh12-docker-28.3.2", - "default": true - } - ], - "store_path": "/nix/store/r81s03afqkm0wfys32xw0x90ygw2mh12-docker-28.3.2" - } - } - }, - "gh@latest": { - "last_modified": "2025-07-24T15:00:16Z", - "resolved": "github:NixOS/nixpkgs/b74a30dbc0a72e20df07d43109339f780b439291#gh", - "source": "devbox-search", - "version": "2.76.1", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/1rk4zapq51hwrx1shzd059aha1n8rpys-gh-2.76.1", - "default": true - } - ], - "store_path": "/nix/store/1rk4zapq51hwrx1shzd059aha1n8rpys-gh-2.76.1" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/wnbz91jxavdyrql8gn4lccl236p49684-gh-2.76.1", - "default": true - } - ], - "store_path": "/nix/store/wnbz91jxavdyrql8gn4lccl236p49684-gh-2.76.1" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/vs7c36g9bz9wqkpy8lf48c1c2r2d9d7c-gh-2.76.1", - "default": true - } - ], - "store_path": "/nix/store/vs7c36g9bz9wqkpy8lf48c1c2r2d9d7c-gh-2.76.1" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/sv3yv54i9wn5xmi3ppvdsq6xx4iv4axa-gh-2.76.1", - "default": true - } - ], - "store_path": "/nix/store/sv3yv54i9wn5xmi3ppvdsq6xx4iv4axa-gh-2.76.1" - } - } - }, - "git@latest": { - "last_modified": "2025-07-13T22:45:35Z", - "resolved": "github:NixOS/nixpkgs/a421ac6595024edcfbb1ef950a3712b89161c359#git", - "source": "devbox-search", - "version": "2.50.0", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/2jwgd7jj1dil1b73h8hnh0xj928416jp-git-2.50.0", - "default": true - }, - { - "name": "doc", - "path": "/nix/store/wfg8mczayhr7k13bq6fjl1h7rxg5f6p8-git-2.50.0-doc" - } - ], - "store_path": "/nix/store/2jwgd7jj1dil1b73h8hnh0xj928416jp-git-2.50.0" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/7mp9n7lbilhk56s842rigrjclbr5ipdj-git-2.50.0", - "default": true - }, - { - "name": "debug", - "path": "/nix/store/dajrhy2l14ghs5awaag5n8yj62lwsyg9-git-2.50.0-debug" - }, - { - "name": "doc", - "path": "/nix/store/kj8r3acr12x0hkxs0hyrpd8wknvvwhd2-git-2.50.0-doc" - } - ], - "store_path": "/nix/store/7mp9n7lbilhk56s842rigrjclbr5ipdj-git-2.50.0" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/wy5g4i1fr1vrg2drjflbsd75rq7j9rh9-git-2.50.0", - "default": true - }, - { - "name": "doc", - "path": "/nix/store/kc1k9n4im10nlm6csp16jg3052vdmifa-git-2.50.0-doc" - } - ], - "store_path": "/nix/store/wy5g4i1fr1vrg2drjflbsd75rq7j9rh9-git-2.50.0" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/khdq35xh67vw7j7k9y4q9l0svxznhx1b-git-2.50.0", - "default": true - }, - { - "name": "debug", - "path": "/nix/store/h29apnv0hcp0w03whsh03izhq7ln1jyw-git-2.50.0-debug" - }, - { - "name": "doc", - "path": "/nix/store/fypvhmxqj3583rkzxvmwakw10yri2i23-git-2.50.0-doc" - } - ], - "store_path": "/nix/store/khdq35xh67vw7j7k9y4q9l0svxznhx1b-git-2.50.0" - } - } - }, - "github:NixOS/nixpkgs/nixpkgs-unstable": { - "last_modified": "2025-08-02T08:13:18Z", - "resolved": "github:NixOS/nixpkgs/c02d05bcf73fb496c604798c2268ed424a09e73e?lastModified=1754122398&narHash=sha256-CyIrZ68gVLSZGa2ERK7zc2dGabvWp2A8PM6PII9M7gI%3D" - }, - "glibcLocales@latest": { - "last_modified": "2025-07-13T22:45:35Z", - "resolved": "github:NixOS/nixpkgs/a421ac6595024edcfbb1ef950a3712b89161c359#glibcLocales", - "source": "devbox-search", - "version": "2.40-66", - "systems": { - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/wqz9ji7hzfnhg79wz9p7597vp898i9vz-glibc-locales-2.40-66", - "default": true - } - ], - "store_path": "/nix/store/wqz9ji7hzfnhg79wz9p7597vp898i9vz-glibc-locales-2.40-66" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/d7250sbw13rpdrcrcgv6hi6jkyp94m0g-glibc-locales-2.40-66", - "default": true - } - ], - "store_path": "/nix/store/d7250sbw13rpdrcrcgv6hi6jkyp94m0g-glibc-locales-2.40-66" - } - } - }, - "go@latest": { - "last_modified": "2025-07-13T22:45:35Z", - "resolved": "github:NixOS/nixpkgs/a421ac6595024edcfbb1ef950a3712b89161c359#go", - "source": "devbox-search", - "version": "1.24.4", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/f4a0g1p943l61wfvqnpdr73v9bsyfhf2-go-1.24.4", - "default": true - } - ], - "store_path": "/nix/store/f4a0g1p943l61wfvqnpdr73v9bsyfhf2-go-1.24.4" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/mdyik6amglpjs533vk927f9w1qmyw239-go-1.24.4", - "default": true - } - ], - "store_path": "/nix/store/mdyik6amglpjs533vk927f9w1qmyw239-go-1.24.4" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/b56ngr9p7x6z368w8m7ps95r3x8gdfv7-go-1.24.4", - "default": true - } - ], - "store_path": "/nix/store/b56ngr9p7x6z368w8m7ps95r3x8gdfv7-go-1.24.4" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/xrzqlk92h7z5mz9mlc4a9dyy91n5b68i-go-1.24.4", - "default": true - } - ], - "store_path": "/nix/store/xrzqlk92h7z5mz9mlc4a9dyy91n5b68i-go-1.24.4" - } - } - }, - "iterm2@latest": { - "last_modified": "2025-07-13T22:45:35Z", - "resolved": "github:NixOS/nixpkgs/a421ac6595024edcfbb1ef950a3712b89161c359#iterm2", - "source": "devbox-search", - "version": "3.5.14", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/iiq4nvfvq2rgsdx3myamr0s922nb294c-iterm2-3.5.14", - "default": true - } - ], - "store_path": "/nix/store/iiq4nvfvq2rgsdx3myamr0s922nb294c-iterm2-3.5.14" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/8mb00nvn0x6x1kysry1a99mshz2ayx37-iterm2-3.5.14", - "default": true - } - ], - "store_path": "/nix/store/8mb00nvn0x6x1kysry1a99mshz2ayx37-iterm2-3.5.14" - } - } - }, - "mysql@latest": { - "last_modified": "2023-02-24T09:01:09Z", - "plugin_version": "0.0.4", - "resolved": "github:NixOS/nixpkgs/7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11#mysql", - "source": "devbox-search", - "version": "10.6.12" - }, - "neovim@latest": { - "last_modified": "2025-07-15T16:15:05Z", - "resolved": "github:NixOS/nixpkgs/dab3a6e781554f965bde3def0aa2fda4eb8f1708#neovim", - "source": "devbox-search", - "version": "0.11.3", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/20n662aw5dz0rs1l91gybpcijnl2c0q1-neovim-0.11.3", - "default": true - } - ], - "store_path": "/nix/store/20n662aw5dz0rs1l91gybpcijnl2c0q1-neovim-0.11.3" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/69ywpq64jjrrvpww31sp1z1bggy0jxkw-neovim-0.11.3", - "default": true - } - ], - "store_path": "/nix/store/69ywpq64jjrrvpww31sp1z1bggy0jxkw-neovim-0.11.3" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/mjvvwchk25x88rccmyws62cfcm6kzgvj-neovim-0.11.3", - "default": true - } - ], - "store_path": "/nix/store/mjvvwchk25x88rccmyws62cfcm6kzgvj-neovim-0.11.3" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/62z9sarrycxm5agv1c1mhf0bbw2qw71k-neovim-0.11.3", - "default": true - } - ], - "store_path": "/nix/store/62z9sarrycxm5agv1c1mhf0bbw2qw71k-neovim-0.11.3" - } - } - }, - "nodejs@latest": { - "last_modified": "2025-07-20T07:42:04Z", - "plugin_version": "0.0.2", - "resolved": "github:NixOS/nixpkgs/7c688a0875df5a8c28a53fb55ae45e94eae0dddb#nodejs_24", - "source": "devbox-search", - "version": "24.4.1", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/1c4jixl4s8kyc9ypy6fbwrbwwvaxldi8-nodejs-24.4.1", - "default": true - }, - { - "name": "dev", - "path": "/nix/store/liix5qs67nyqidmi00zazw12ksc0pxxq-nodejs-24.4.1-dev" - }, - { - "name": "libv8", - "path": "/nix/store/fm4q7qypbnb8iyf9qm7i07vzybhp6b53-nodejs-24.4.1-libv8" - } - ], - "store_path": "/nix/store/1c4jixl4s8kyc9ypy6fbwrbwwvaxldi8-nodejs-24.4.1" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/k24g5rcnx42s4lwmgr9fh898xsc45668-nodejs-24.4.1", - "default": true - }, - { - "name": "dev", - "path": "/nix/store/jiz68w6405makvg4iibnhx5hhq95hbpg-nodejs-24.4.1-dev" - }, - { - "name": "libv8", - "path": "/nix/store/yz7jfa49dq3y5hk7w4fzgxbbxn5r4c7b-nodejs-24.4.1-libv8" - } - ], - "store_path": "/nix/store/k24g5rcnx42s4lwmgr9fh898xsc45668-nodejs-24.4.1" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/wccpr20l2n1fmnyard3y33kkzi9iadb3-nodejs-24.4.1", - "default": true - }, - { - "name": "dev", - "path": "/nix/store/cpw2f6acji9nl40wsdcxy7vqb1895i4p-nodejs-24.4.1-dev" - }, - { - "name": "libv8", - "path": "/nix/store/b8q5m7qggq3dydfksmxnrqyx70qrf44w-nodejs-24.4.1-libv8" - } - ], - "store_path": "/nix/store/wccpr20l2n1fmnyard3y33kkzi9iadb3-nodejs-24.4.1" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/2bg4yn1ccasnw6cscqhgqwzfw8j2xq1m-nodejs-24.4.1", - "default": true - }, - { - "name": "dev", - "path": "/nix/store/7865hgg0qmbyambm53765ddy96qsg1vs-nodejs-24.4.1-dev" - }, - { - "name": "libv8", - "path": "/nix/store/rla4nj6lpf3dz3fxqbgqzvlm3bwd0545-nodejs-24.4.1-libv8" - } - ], - "store_path": "/nix/store/2bg4yn1ccasnw6cscqhgqwzfw8j2xq1m-nodejs-24.4.1" - } - } - }, - "oh-my-zsh@latest": { - "last_modified": "2025-07-13T22:45:35Z", - "resolved": "github:NixOS/nixpkgs/a421ac6595024edcfbb1ef950a3712b89161c359#oh-my-zsh", - "source": "devbox-search", - "version": "2025-07-01", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/19xqbccsi5awzxd48z235sixrhl364dg-oh-my-zsh-2025-07-01", - "default": true - } - ], - "store_path": "/nix/store/19xqbccsi5awzxd48z235sixrhl364dg-oh-my-zsh-2025-07-01" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/l00icfiagfhn58s6ff68whha3asa4lxl-oh-my-zsh-2025-07-01", - "default": true - } - ], - "store_path": "/nix/store/l00icfiagfhn58s6ff68whha3asa4lxl-oh-my-zsh-2025-07-01" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/ndwfarx6hx222d8q30x5c6m4cpyrpxfi-oh-my-zsh-2025-07-01", - "default": true - } - ], - "store_path": "/nix/store/ndwfarx6hx222d8q30x5c6m4cpyrpxfi-oh-my-zsh-2025-07-01" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/msxwn6p2afciwndh0qwmyvrsh3idy9vf-oh-my-zsh-2025-07-01", - "default": true - } - ], - "store_path": "/nix/store/msxwn6p2afciwndh0qwmyvrsh3idy9vf-oh-my-zsh-2025-07-01" - } - } - }, - "pnpm@latest": { - "last_modified": "2025-07-18T03:30:42Z", - "resolved": "github:NixOS/nixpkgs/e821e03193486359aa942372be2d9c1f377b7a18#pnpm", - "source": "devbox-search", - "version": "10.13.1", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/wqa2kn4a7ni8y9p293j6xwlr0111jha0-pnpm-10.13.1", - "default": true - } - ], - "store_path": "/nix/store/wqa2kn4a7ni8y9p293j6xwlr0111jha0-pnpm-10.13.1" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/91nil2hyw90n1yxkr9myd70kxb3cvadc-pnpm-10.13.1", - "default": true - } - ], - "store_path": "/nix/store/91nil2hyw90n1yxkr9myd70kxb3cvadc-pnpm-10.13.1" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/ljac08bdv87gy7jj5j2dkxgbzy93bjc1-pnpm-10.13.1", - "default": true - } - ], - "store_path": "/nix/store/ljac08bdv87gy7jj5j2dkxgbzy93bjc1-pnpm-10.13.1" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/cdm1ypkmixsyvzj42p8has6j7884z6gv-pnpm-10.13.1", - "default": true - } - ], - "store_path": "/nix/store/cdm1ypkmixsyvzj42p8has6j7884z6gv-pnpm-10.13.1" - } - } - }, - "python@3.10": { - "last_modified": "2025-07-13T22:45:35Z", - "plugin_version": "0.0.4", - "resolved": "github:NixOS/nixpkgs/a421ac6595024edcfbb1ef950a3712b89161c359#python310", - "source": "devbox-search", - "version": "3.10.18", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/6jjmyqg9fifixf6vjn9y035ry6b25jri-python3-3.10.18", - "default": true - } - ], - "store_path": "/nix/store/6jjmyqg9fifixf6vjn9y035ry6b25jri-python3-3.10.18" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/470jaaj596rnanc1ncihhjxwj8lcjg6g-python3-3.10.18", - "default": true - }, - { - "name": "debug", - "path": "/nix/store/a6h62f9z2rp5wj2647qd3zdm9f8yrz80-python3-3.10.18-debug" - } - ], - "store_path": "/nix/store/470jaaj596rnanc1ncihhjxwj8lcjg6g-python3-3.10.18" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/vr9vxyczaq2gjhf10gn9x1hizqqzx5s4-python3-3.10.18", - "default": true - } - ], - "store_path": "/nix/store/vr9vxyczaq2gjhf10gn9x1hizqqzx5s4-python3-3.10.18" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/30z1i1ys8jsqrs0b65g0j5phayr9bhcl-python3-3.10.18", - "default": true - }, - { - "name": "debug", - "path": "/nix/store/gmi76h2iidz1n15fyj4fij4nx3jvw1mz-python3-3.10.18-debug" - } - ], - "store_path": "/nix/store/30z1i1ys8jsqrs0b65g0j5phayr9bhcl-python3-3.10.18" - } - } - }, - "ripgrep@latest": { - "last_modified": "2025-07-13T22:45:35Z", - "resolved": "github:NixOS/nixpkgs/a421ac6595024edcfbb1ef950a3712b89161c359#ripgrep", - "source": "devbox-search", - "version": "14.1.1", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/lxv4lraggh0g9bjcaxf4qicar3q7i1rz-ripgrep-14.1.1", - "default": true - } - ], - "store_path": "/nix/store/lxv4lraggh0g9bjcaxf4qicar3q7i1rz-ripgrep-14.1.1" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/i4dsm587azhml1cqf7agwd9dxgx52n5g-ripgrep-14.1.1", - "default": true - } - ], - "store_path": "/nix/store/i4dsm587azhml1cqf7agwd9dxgx52n5g-ripgrep-14.1.1" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/sn28r34yalqqj7sp1qnjw8ldl30cjsz4-ripgrep-14.1.1", - "default": true - } - ], - "store_path": "/nix/store/sn28r34yalqqj7sp1qnjw8ldl30cjsz4-ripgrep-14.1.1" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/8m8bfl2xl7vpr8qlibgb0cd3ybkkmn3j-ripgrep-14.1.1", - "default": true - } - ], - "store_path": "/nix/store/8m8bfl2xl7vpr8qlibgb0cd3ybkkmn3j-ripgrep-14.1.1" - } - } - }, - "spotify@latest": { - "last_modified": "2025-07-22T02:38:50Z", - "resolved": "github:NixOS/nixpkgs/83e677f31c84212343f4cc553bab85c2efcad60a#spotify", - "source": "devbox-search", - "version": "1.2.60.564.gcc6305cb", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "path": "/nix/store/gqjh8l9l7zg94d9gmp3dr5pj99175wrm-spotify-1.2.64.408", - "default": true - } - ] - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/21mi9gi4zk2yr2qv30gb17cm2y4js06c-spotify-1.2.60.564.gcc6305cb", - "default": true - } - ], - "store_path": "/nix/store/21mi9gi4zk2yr2qv30gb17cm2y4js06c-spotify-1.2.60.564.gcc6305cb" - } - } - }, - "yarn@latest": { - "last_modified": "2025-07-13T22:45:35Z", - "resolved": "github:NixOS/nixpkgs/a421ac6595024edcfbb1ef950a3712b89161c359#yarn", - "source": "devbox-search", - "version": "1.22.22", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/mgj28l56n5k8zp5l1vwzdjnqi188y5pk-yarn-1.22.22", - "default": true - } - ], - "store_path": "/nix/store/mgj28l56n5k8zp5l1vwzdjnqi188y5pk-yarn-1.22.22" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/gknplr1q5gs5p4pkmyd0r7dcjhznpkl3-yarn-1.22.22", - "default": true - } - ], - "store_path": "/nix/store/gknplr1q5gs5p4pkmyd0r7dcjhznpkl3-yarn-1.22.22" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/613ndjla4irf3lj468igks11dyn7xpnx-yarn-1.22.22", - "default": true - } - ], - "store_path": "/nix/store/613ndjla4irf3lj468igks11dyn7xpnx-yarn-1.22.22" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/6mzbvyzh4dfgfab6lciclji7awp9w3c4-yarn-1.22.22", - "default": true - } - ], - "store_path": "/nix/store/6mzbvyzh4dfgfab6lciclji7awp9w3c4-yarn-1.22.22" - } - } - } - } -} diff --git a/linux/home.nix b/linux/home.nix index 90cb38e..d7b8220 100644 --- a/linux/home.nix +++ b/linux/home.nix @@ -1,7 +1,3 @@ -/Users/jenc/.dotfiles/linux/home.nix -``` - -```nix # linux/home.nix - Home Manager configuration for Linux (Debian/RPi) { config, pkgs, lib, ... }: diff --git a/setup-pi.md b/setup-pi.md index 1f5cb21..1260299 100644 --- a/setup-pi.md +++ b/setup-pi.md @@ -1,4 +1,4 @@ -# Setting Up Dotfiles on Debian Trixie & Raspberry Pi 4 +Setting Up Dotfiles on Debian Trixie & Raspberry Pi 4 Quick guide for setting up this dotfiles repository on Debian Trixie running on Raspberry Pi 4. @@ -202,4 +202,3 @@ source ~/.bashrc # Create a symlink to the nvim binary in /usr/local/bin to make it available globally sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/nvim ``` - From 422dd808de69b0c8196ac03ee5114372dcfa4798 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Tue, 17 Mar 2026 13:51:08 -0400 Subject: [PATCH 19/27] docs: clarify NixOS config doesn't need to be copied to /etc/nixos - Add note explaining flakes read config directly from dotfiles - Clarify hosts/nixos/configuration.nix usage --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d33a783..e6683a3 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,9 @@ echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf sudo nixos-rebuild switch --flake .#nixos ``` + +> **Note**: The NixOS configuration is in `hosts/nixos/configuration.nix`. Using flakes, you do NOT need to copy it to `/etc/nixos/` - it is read directly from your dotfiles directory. + #### Linux (Debian/Ubuntu/Raspberry Pi) ```bash From e4bf9f8fc2b1e73371280ee9b754e0eaa18cba03 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Tue, 17 Mar 2026 17:01:09 -0400 Subject: [PATCH 20/27] fix: add direnv to linux/home.nix packages - Fix syntax error (remove stray line) - Add direnv to packages list --- linux/home.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linux/home.nix b/linux/home.nix index d7b8220..1131c54 100644 --- a/linux/home.nix +++ b/linux/home.nix @@ -30,6 +30,9 @@ # Shell prompts starship + # direnv + direnv + # Utilities stow tree @@ -53,8 +56,6 @@ # - tailscale: via official script # ===================================================================== - # Install direnv via nix (available in pkgs) - direnv # ===================================================================== # ENVIRONMENT VARIABLES From 5c2083c40deb64f8648d400d253591e0aea96b57 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Tue, 17 Mar 2026 17:06:20 -0400 Subject: [PATCH 21/27] fix: add required home.stateVersion to linux/home.nix - Add home.stateVersion = "24.05" (required by home-manager) --- linux/home.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux/home.nix b/linux/home.nix index 1131c54..db96cc8 100644 --- a/linux/home.nix +++ b/linux/home.nix @@ -60,6 +60,8 @@ # ===================================================================== # ENVIRONMENT VARIABLES # ===================================================================== + home.stateVersion = "24.05"; + home.sessionVariables = { EDITOR = "nvim"; VISUAL = "nvim"; From becc6ab8829737c5509f1b803d0861b8b19ac865 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Tue, 17 Mar 2026 17:08:28 -0400 Subject: [PATCH 22/27] fix: update nixpkgs to 25.05 for home-manager compatibility - Change from nixos-24.05 to nixos-25.05 - Fixes lib.genAttrs' error --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 20575e9..8ebb066 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ description = "Dotfiles with Nix and Home Manager"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; From 64aa224e7dac72fa7b264e5b98a59f33c8feb486 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Tue, 17 Mar 2026 17:10:03 -0400 Subject: [PATCH 23/27] fix: add home.username to linux/home.nix - Add home.username = "jenc" (required by home-manager) --- linux/home.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/home.nix b/linux/home.nix index db96cc8..7647a7e 100644 --- a/linux/home.nix +++ b/linux/home.nix @@ -61,6 +61,7 @@ # ENVIRONMENT VARIABLES # ===================================================================== home.stateVersion = "24.05"; + home.username = "jenc"; home.sessionVariables = { EDITOR = "nvim"; From f134a124bfe1183e56157d6eefa4b39c73f05a90 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Tue, 17 Mar 2026 17:11:56 -0400 Subject: [PATCH 24/27] fix: add home.homeDirectory to linux/home.nix - Add home.homeDirectory = "/home/jenc" (required by home-manager) --- linux/home.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/home.nix b/linux/home.nix index 7647a7e..ea98fd9 100644 --- a/linux/home.nix +++ b/linux/home.nix @@ -62,6 +62,7 @@ # ===================================================================== home.stateVersion = "24.05"; home.username = "jenc"; + home.homeDirectory = "/home/jenc"; home.sessionVariables = { EDITOR = "nvim"; From 177f04781a564119cbaf389dbfe4360ca64801c1 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Tue, 17 Mar 2026 17:13:48 -0400 Subject: [PATCH 25/27] fix: update nixpkgs to 26.05 and remove fetchTarball - Change nixpkgs from 25.05 to 26.05 (matches home-manager) - Remove fetchTarball (vscode-server now via nixpkgs) --- flake.nix | 2 +- hosts/nixos/configuration.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 8ebb066..f010677 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ description = "Dotfiles with Nix and Home Manager"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/nixos/configuration.nix b/hosts/nixos/configuration.nix index 6ff7a51..51a8b97 100644 --- a/hosts/nixos/configuration.nix +++ b/hosts/nixos/configuration.nix @@ -8,7 +8,7 @@ imports = [ # Include the results of the hardware scan. # ./hardware-configuration.nix - (fetchTarball "https://github.com/nix-community/nixos-vscode-server/tarball/master") + # vscode-server managed via nixpkgs ]; From c89987a27f9f8d442b211ff66fa1a1bd54d265cd Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Tue, 17 Mar 2026 17:15:41 -0400 Subject: [PATCH 26/27] fix: use nixos-unstable and home-manager release-26.05 - Change nixpkgs to nixos-unstable (nixos-26.05 doesn't exist) - Pin home-manager to release-26.05 --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index f010677..4302ea7 100644 --- a/flake.nix +++ b/flake.nix @@ -3,9 +3,9 @@ description = "Dotfiles with Nix and Home Manager"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager = { - url = "github:nix-community/home-manager"; + url = "github:nix-community/home-manager/release-26.05"; inputs.nixpkgs.follows = "nixpkgs"; }; }; From c2b7518586c4d12f7bc1ae240e56d961a4178a80 Mon Sep 17 00:00:00 2001 From: Jen Chan Date: Tue, 17 Mar 2026 17:31:07 -0400 Subject: [PATCH 27/27] fix: use home-manager main branch (release branch doesn't exist) - Remove home-manager release pin - Keep nixos-unstable for nixpkgs --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 4302ea7..fb61d70 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager = { - url = "github:nix-community/home-manager/release-26.05"; + url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; };