From 797c6c335a57921cdf19e48851010afba348a606 Mon Sep 17 00:00:00 2001 From: xeoncross Date: Tue, 4 Aug 2026 14:54:59 -0500 Subject: [PATCH 1/7] Added vscode and changed to my user --- configuration.nix | 6 +++++- flake.nix | 2 +- home.nix | 3 +++ vscode.nix | 20 ++++++++++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 vscode.nix diff --git a/configuration.nix b/configuration.nix index 74baa399..91c3e29f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -36,10 +36,14 @@ onActivation.extraFlags = [ "--force" ]; brews = [ "herdr" + "ncdu" # disk space usage cli tool + "cloc" # lines of code and other metadata for a folder + "llama.cpp" # run local models like qwen ]; casks = [ - "wezterm" + "wezterm" # replaces zsh as our terminal of choice "claude-code" + "sublime-text" # default text editor ]; }; } diff --git a/flake.nix b/flake.nix index 96b6b8dd..a5ddc2e1 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,7 @@ let # The one username line to change if this isn't your machine. # bootstrap.sh offers to rewrite this for you if your macOS username differs. - user = "kunchen"; + user = "owner"; in { darwinConfigurations."mac" = nix-darwin.lib.darwinSystem { diff --git a/home.nix b/home.nix index 540dc972..812399ee 100644 --- a/home.nix +++ b/home.nix @@ -5,6 +5,8 @@ let in { + imports = [ ./vscode.nix ]; + home.username = user; home.homeDirectory = "/Users/${user}"; home.stateVersion = "24.11"; @@ -16,6 +18,7 @@ in jq # json on the command line lazygit neovim + # vscode + its extensions live in ./vscode.nix # the font everything renders in nerd-fonts.hack ]; diff --git a/vscode.nix b/vscode.nix new file mode 100644 index 00000000..9821f2e3 --- /dev/null +++ b/vscode.nix @@ -0,0 +1,20 @@ +# VSCode plus its extensions, installed from nixpkgs like every other package. +# Kept in its own file so editor/extension changes are easy to find and edit. +# All three extensions come from nixpkgs' `vscode-extensions` set, so there is +# no extra flake input to keep in sync. Add more by name below. +{ pkgs, ... }: + +{ + home.packages = [ + (pkgs.vscode-with-extensions.override { + vscodeExtensions = with pkgs.vscode-extensions; [ + golang.go # Go language support + rust-lang.rust-analyzer # Rust language server + ms-python.vscode-pylance # Python language server (unfree) + saoudrizwan.claude-dev # Cline for local agents + shd101wyy.markdown-preview-enhanced + jnoortheen.nix-ide # nix language server + ]; + }) + ]; +} From b1332cc64f51cf6ddc50211766f91331495538c7 Mon Sep 17 00:00:00 2001 From: xeoncross Date: Tue, 4 Aug 2026 15:40:12 -0500 Subject: [PATCH 2/7] Add vscode settings.json --- README.md | 4 ++++ home.nix | 6 ++++++ home/.vscode/settings.json | 30 ++++++++++++++++++++++++++++++ vscode.nix | 2 -- 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 home/.vscode/settings.json diff --git a/README.md b/README.md index d555cb33..8be7f337 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ Watch the walkthrough: https://youtu.be/5N-okeDdIuI My personal Mac setup, managed with nix-darwin and home-manager. One repo, one command, and a fresh Mac ends up configured the same way every time. +nix-darwin manages macOS level packages. home-manager manages home folder settings. + +> This is a fork of https://github.com/kunchenguid/dotfiles to add my own tooling around vscode, language servers, local models, and other development needs. + ## Contributing / Using This Repo These are my personal dotfiles, shared publicly so people can read them, learn from them, and fork them freely. diff --git a/home.nix b/home.nix index 812399ee..4d93e0f4 100644 --- a/home.nix +++ b/home.nix @@ -40,6 +40,8 @@ in m = "git switch main"; cc = "claude --dangerously-skip-permissions"; co = "codex --full-auto"; + server = "python3 -m http.server 8080"; + qwen = "llama-server -hf unsloth/Qwen3.6-27B-MTP-GGUF:Q8_0 --spec-type draft-mtp -ngl 999 -fa on -c 65536 --jinja --port 8080"; }; }; @@ -82,4 +84,8 @@ in config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/AGENTS.md"; home.file.".config/opencode/AGENTS.md".source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/AGENTS.md"; + + # VSCode + home.file."Library/Application Support/Code/User/settings.json".source = + config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.vscode/settings.json"; } diff --git a/home/.vscode/settings.json b/home/.vscode/settings.json new file mode 100644 index 00000000..acca434c --- /dev/null +++ b/home/.vscode/settings.json @@ -0,0 +1,30 @@ +{ + "go.toolsManagement.autoUpdate": true, + "go.testTags": "", + "go.testOnSave": true, + "go.testFlags": ["-v"], + "go.formatTool": "goimports", + "go.lintTool": "golint", + "go.lintFlags": [], + "go.useLanguageServer": true, + "go.languageServerFlags": ["-rpc.trace"], + "[go]": { + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.organizeImports":"explicit", + "source.fixAll":"explicit" + } + }, + "editor.rulers": [80, 120], + "workbench.settings.applyToAllProfiles": [], + "claudeCode.preferredLocation": "panel", + "editor.wordWrap": "wordWrapColumn", + "editor.wordWrapColumn": 80, + "[html]": { + "editor.wordWrapColumn": 80 + }, + "settingsSync.ignoredSettings": [ + + ], + "[c]": {} +} \ No newline at end of file diff --git a/vscode.nix b/vscode.nix index 9821f2e3..a43c300a 100644 --- a/vscode.nix +++ b/vscode.nix @@ -1,7 +1,5 @@ # VSCode plus its extensions, installed from nixpkgs like every other package. # Kept in its own file so editor/extension changes are easy to find and edit. -# All three extensions come from nixpkgs' `vscode-extensions` set, so there is -# no extra flake input to keep in sync. Add more by name below. { pkgs, ... }: { From 873ef3e7c0aca03cf09f5b960376bbfe22a6843d Mon Sep 17 00:00:00 2001 From: xeoncross Date: Thu, 6 Aug 2026 19:23:50 -0500 Subject: [PATCH 3/7] Update with additional packages for development including Go and Node/NPM --- configuration.nix | 17 +++++++++++++---- home/.config/nvim/lua/plugins/navigation.lua | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/configuration.nix b/configuration.nix index 91c3e29f..b2f1b572 100644 --- a/configuration.nix +++ b/configuration.nix @@ -35,15 +35,24 @@ onActivation.autoUpdate = true; onActivation.extraFlags = [ "--force" ]; brews = [ - "herdr" - "ncdu" # disk space usage cli tool - "cloc" # lines of code and other metadata for a folder - "llama.cpp" # run local models like qwen + "herdr" # tmux for agents + "gh" # GitHub CLI + "ca-certificates" # required for node + "node" + "go" + + # Common shell / systems tools + "wget" + "curl" + "cloc" # lines of code and other metadata for a repo + "ncdu" # disk space usage cli scanner + "jq" # json parsing ]; casks = [ "wezterm" # replaces zsh as our terminal of choice "claude-code" "sublime-text" # default text editor + "rectangle" # window management ]; }; } diff --git a/home/.config/nvim/lua/plugins/navigation.lua b/home/.config/nvim/lua/plugins/navigation.lua index df163f35..67177d85 100644 --- a/home/.config/nvim/lua/plugins/navigation.lua +++ b/home/.config/nvim/lua/plugins/navigation.lua @@ -22,3 +22,4 @@ return { }, } +-- Explaination: https://youtu.be/5N-okeDdIuI?t=1475 \ No newline at end of file From 0e840d4263c7acce1d8899c9b463fd78a4703119 Mon Sep 17 00:00:00 2001 From: xeoncross Date: Sat, 8 Aug 2026 12:56:52 -0500 Subject: [PATCH 4/7] Add LM Studio and Qwen 3.6 models for local agents --- configuration.nix | 1 + home/.pi/agent/models.json | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/configuration.nix b/configuration.nix index b2f1b572..198ddbbc 100644 --- a/configuration.nix +++ b/configuration.nix @@ -51,6 +51,7 @@ casks = [ "wezterm" # replaces zsh as our terminal of choice "claude-code" + "lm-studio" # run local models "sublime-text" # default text editor "rectangle" # window management ]; diff --git a/home/.pi/agent/models.json b/home/.pi/agent/models.json index c4ee7894..76000bf6 100644 --- a/home/.pi/agent/models.json +++ b/home/.pi/agent/models.json @@ -12,6 +12,15 @@ "contextWindow": 272000 } } + }, + "lmstuido": { + "baseUrl": "http://127.0.0.1:1234/v1", + "api": "openai-completions", + "apiKey": "lmstudio", + "models": [ + { "id": "qwen/qwen3.6-35b-a3b" }, + { "id": "qwen/qwen3.6-27b" } + ] } } } From 62bea9b042071043f1e9f5893c112eb079a76ef2 Mon Sep 17 00:00:00 2001 From: xeoncross Date: Sat, 8 Aug 2026 14:22:40 -0500 Subject: [PATCH 5/7] Add stats menu bar app + wezTerm memory usage report so we can keep track of memory while running local models --- configuration.nix | 4 ++- home/.config/wezterm/wezterm.lua | 51 ++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index 198ddbbc..5f3d3781 100644 --- a/configuration.nix +++ b/configuration.nix @@ -17,7 +17,7 @@ AppleInterfaceStyle = "Dark"; KeyRepeat = 2; # fast key repeat InitialKeyRepeat = 15; # short delay before repeat - _HIHideMenuBar = true; # auto-hide the menu bar + # _HIHideMenuBar = true; # auto-hide the top menu AppleShowAllExtensions = true; }; dock.autohide = true; @@ -54,6 +54,8 @@ "lm-studio" # run local models "sublime-text" # default text editor "rectangle" # window management + "handy" # local speech-to-text using Whisper or Parakeet models + "stats" # CPU / Memory / swap usage while runing local models ]; }; } diff --git a/home/.config/wezterm/wezterm.lua b/home/.config/wezterm/wezterm.lua index 24041e72..42153107 100644 --- a/home/.config/wezterm/wezterm.lua +++ b/home/.config/wezterm/wezterm.lua @@ -44,4 +44,55 @@ wezterm.on("window-focus-changed", function(window) window:set_config_overrides(overrides) end) +-- Function to get memory usage based on OS +local function get_memory_usage() + local cmd = "" + + if wezterm.target_triple:find("apple") then + -- macOS command + cmd = [[ + vm_stat | awk ' + /Pages free/ {free=$3} + /Pages active/ {a=$3} + /Pages inactive/ {i=$3} + /Pages speculative/ {s=$3} + /Pages wired down/ {w=$3} + END { + used=a+i+s+w; + total=used+free; + if (total==0) { print "N/A"; exit 1 } + printf "%.1f%%", (used/total)*100 + }' + ]] + elseif wezterm.target_triple:find("windows") then + -- Windows PowerShell command + cmd = "powershell -NoProfile -Command \"(Get-CimInstance Win32_OperatingSystem).FreePhysicalMemory\"" + else + -- Linux command + cmd = "free -h | awk '/^Mem:/ {print $3 \"/\" $2}'" + end + + local success, stdout, stderr = wezterm.run_child_process({ "sh", "-c", cmd }) + + -- Fallback for Windows if sh isn't available natively + if not success and wezterm.target_triple:find("windows") then + success, stdout, stderr = wezterm.run_child_process({ "powershell.exe", "-NoProfile", "-Command", cmd }) + end + + if success then + return stdout:gsub("%s+", "") -- Clean up whitespace/newlines + end + return "Mem: Unknown" +end + +wezterm.on('update-status', function(window, pane) + local mem = get_memory_usage() + + window:set_right_status(wezterm.format({ + { Background = { Color = '#1e1e2e' } }, + { Foreground = { Color = '#fab387' } }, + { Text = ' Mem: ' .. mem .. ' ' }, + })) +end) + return config From 39ea3d101154026550773e092ff1a0dac283bde8 Mon Sep 17 00:00:00 2001 From: xeoncross Date: Mon, 10 Aug 2026 13:23:44 -0500 Subject: [PATCH 6/7] Add treehouse to system nix install --- flake.nix | 9 +++++++-- home.nix | 8 ++++++-- vscode.nix | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index a5ddc2e1..b17ed4ac 100644 --- a/flake.nix +++ b/flake.nix @@ -12,9 +12,14 @@ home-manager.inputs.nixpkgs.follows = "nixpkgs"; nix-homebrew.url = "github:zhaofengli/nix-homebrew"; + + treehouse = { + url = "github:kunchenguid/treehouse"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = inputs@{ self, nix-darwin, nix-homebrew, home-manager, nixpkgs }: + outputs = inputs@{ self, nix-darwin, nix-homebrew, home-manager, nixpkgs, treehouse }: let # The one username line to change if this isn't your machine. # bootstrap.sh offers to rewrite this for you if your macOS username differs. @@ -30,7 +35,7 @@ { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit user; }; + home-manager.extraSpecialArgs = { inherit user treehouse; }; home-manager.users.${user} = import ./home.nix; } ]; diff --git a/home.nix b/home.nix index 4d93e0f4..daf7e60c 100644 --- a/home.nix +++ b/home.nix @@ -1,4 +1,4 @@ -{ config, pkgs, user, ... }: +{ config, pkgs, user, treehouse, ... }: let dotfiles = "${config.home.homeDirectory}/.dotfiles"; @@ -21,6 +21,8 @@ in # vscode + its extensions live in ./vscode.nix # the font everything renders in nerd-fonts.hack + # treehouse install + treehouse.packages.${pkgs.system}.default ]; fonts.fontconfig.enable = true; home.sessionVariables.EDITOR = "nvim"; @@ -41,7 +43,9 @@ in cc = "claude --dangerously-skip-permissions"; co = "codex --full-auto"; server = "python3 -m http.server 8080"; - qwen = "llama-server -hf unsloth/Qwen3.6-27B-MTP-GGUF:Q8_0 --spec-type draft-mtp -ngl 999 -fa on -c 65536 --jinja --port 8080"; + # run models all night / clamshell without letting the computer sleep + preventsleep = "sudo pmset -b sleep 0; sudo pmset -b disablesleep 1"; + enablesleep = "sudo pmset -b sleep 30; sudo pmset -b disablesleep 0"; }; }; diff --git a/vscode.nix b/vscode.nix index a43c300a..0a23d04c 100644 --- a/vscode.nix +++ b/vscode.nix @@ -9,9 +9,9 @@ golang.go # Go language support rust-lang.rust-analyzer # Rust language server ms-python.vscode-pylance # Python language server (unfree) - saoudrizwan.claude-dev # Cline for local agents + saoudrizwan.claude-dev # Cline for local agents shd101wyy.markdown-preview-enhanced - jnoortheen.nix-ide # nix language server + jnoortheen.nix-ide # nix language server ]; }) ]; From 4b2da3e26e5a99aa77c6cdc492880700d05558a0 Mon Sep 17 00:00:00 2001 From: xeoncross Date: Mon, 10 Aug 2026 16:25:54 -0500 Subject: [PATCH 7/7] Add npm packages for skills, gnhf, lavish, chrome, and no-mistakes --- home.nix | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/home.nix b/home.nix index daf7e60c..7f8d894d 100644 --- a/home.nix +++ b/home.nix @@ -1,4 +1,4 @@ -{ config, pkgs, user, treehouse, ... }: +{ config, pkgs, user, treehouse, lib, ... }: let dotfiles = "${config.home.homeDirectory}/.dotfiles"; @@ -92,4 +92,42 @@ in # VSCode home.file."Library/Application Support/Code/User/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.vscode/settings.json"; + + + # we're using nix to install homebrew, then homebrew to install nodejs/npm so + # that we can keep it updated easier than relying on the nix packages. + # However, that means we must install the packages ourselves and homebrew + # doesn't have packages for all of them (neither does nix actually) so... + # ...here we are with a hacky post-install script. + home.activation.installNpmPackages = lib.hm.dag.entryAfter ["writeBoundary"] '' + BREW_BIN="/opt/homebrew/bin" + NODE_PATH="$BREW_BIN/node" + NPM_PATH="$BREW_BIN/npm" + NPX_PATH="$BREW_BIN/npx" + + if [ -x "$NPM_PATH" ]; then + export PATH="$BREW_BIN:$PATH" + + # export NPM_CONFIG_PREFIX="${config.home.homeDirectory}/.npm-global" + # mkdir -p "$NPM_CONFIG_PREFIX" + + echo "Installing global npm packages via Homebrew Node..." + $DRY_RUN_CMD "$NPM_PATH" install -g skills gh-axi chrome-devtools-axi gnhf + else + echo "Warning: Homebrew npm not found at $NPM_PATH yet. Skipping." + fi + + if [ -x "$NPX_PATH" ]; then + export PATH="$BREW_BIN:$PATH" + $DRY_RUN_CMD "$NPX_PATH" skills add kunchenguid/lavish-axi --skill lavish + + # report installed skills + "$NPX_PATH" skills list -g + else + echo "Warning: Homebrew npx not found at $NPX_PATH yet. Skipping." + fi + + # also install the no-mistakes binary + $DRY_RUN_CMD go install github.com/kunchenguid/no-mistakes/cmd/no-mistakes@latest + ''; }