36 Commits

Author SHA1 Message Date
Miguel Palhas 352700fdab fix: point nvchad-starter to git.naps.pt/naps62/nvim-config, add /bin/bash symlink
CI / lint (push) Successful in 29s
CI / eval (push) Failing after 20m59s
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 14:29:39 +01:00
naps62 395055ed35 Merge remote-tracking branch 'origin/main' into yolo
CI / lint (push) Successful in 32s
CI / eval (push) Successful in 2m28s
# Conflicts:
#	home/common/programs/default.nix
2026-08-17 13:09:04 +00:00
naps62 2873d37bda chore: drop notify-hermes hooks
Removes 4 hook entries; PermissionRequest and SubagentStop had no others.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 13:05:41 +00:00
naps62 c57a430fd6 feat: chrome and agent-browser only on yolo
Drops zen-browser and downloads-cleanup. agent-browser was a global npm
install; nixpkgs has it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:57:25 +00:00
naps62 a8880c1441 docs: record why the igpu is unused
pve hardcodes egl-headless with no rendernode, and the nvidia egl vendor
outranks mesa, so virgl lands on llvmpipe.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:50:15 +00:00
naps62 c4a20f6152 docs: record the proxmox vm settings
vga: virtio-gl, serial0 and ovmf are load-bearing and live only on the
hypervisor, so a rebuilt vm would regress silently.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:47:02 +00:00
naps62 738f4cd03f feat: port the tmux config
156-line .tmux.conf plus tpm plugins existed only on the ubuntu box.
Plugins are declared instead of git-cloned at runtime by tpm.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:44:16 +00:00
naps62 dd04becb9c chore: drop pipx
Its test suite fails to build on this nixpkgs pin, blocking the whole
generation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:40:59 +00:00
Miguel Palhas a8593d9157 wl kbptr
CI / lint (push) Successful in 32s
CI / eval (push) Failing after 1m39s
2026-08-17 13:39:37 +01:00
Miguel Palhas af28175e1c home: clear four eval warnings
All pre-existing, all mechanical:

- pointerCursor no longer implies generation from the block alone; set enable.
- top-level elixir_1_18 alias is deprecated for the beamPackages set. Same
  derivation, 1.18.4 either way.
- pkgs.system -> pkgs.stdenv.hostPlatform.system.
- fzf and atuin both bind Ctrl-R. Atuin is sourced last so it already owned the
  key; historyWidget.zsh.command = "" states that explicitly and satisfies
  home-manager's conflict check. Behaviour is unchanged and fzf keeps Ctrl-T
  and Alt-C.
2026-08-17 13:39:37 +01:00
Miguel Palhas 4028c55d56 hyprland: add wl-kbptr, patched for HiDPI and rotated outputs
Keyboard control of the mouse pointer. SUPER+G labels detected targets and
clicks one; SUPER+SHIFT+G falls back to tile -> bisect for anything detection
misses.

Stock wl-kbptr 0.4.1 is unusable on this setup, for two unrelated reasons:

- Target detection is hardcoded for ~1080p. filter_rects() discards any
  candidate with height >= 50 or width >= 500, so on a 4K screen at scale = 1
  nearly every real control is dropped for being "too big" and only emoji and
  avatars survive — a full Slack window produced ~8 labels, all on images.

- On the rotated monitor the pointer landed in the wrong place. move_pointer()
  takes output->width/height from xdg_output.logical_size, which is already
  rotated, then applies the transform again. Asking for global (4000,1000) on
  DP-2 landed at (4286,3726); the double rotation predicts (4301,3736).

Neither is exposed as a config option, hence the overrideAttrs. Sizes in the
config file are likewise doubled: wl-kbptr paints raw cairo onto a layer
surface and never sees a scale factor, so upstream's defaults render half-size.

Both binds are pidof-guarded: wl-kbptr only exits on a keypress, so an overlay
that loses focus first sits there holding an exclusive keyboard grab.
2026-08-17 13:39:37 +01:00
naps62 21d9f89674 feat: add missing cli tooling
Ports what was apt-installed on the ubuntu box. rtk matters most: the
claude hooks rewrite commands through it, and it silently no-ops without.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:39:11 +00:00
naps62 4ce204d46f chore: drop postgresql from yolo
Nothing connects to it — every database here runs in a container.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 12:15:06 +00:00
naps62 38bfd6a76d fix: raise sunshine fd limit
It leaks a /dev/dri/renderD fd per encoder probe, hits the 1024 default,
and mesa can then no longer dlopen the GBM driver — capture degrades to a
black picture with no error surfaced.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 09:05:28 +00:00
naps62 c97f5999e5 chore: bump agent-skills for hooks and scripts
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 08:56:53 +00:00
naps62 37e44b9a3d fix: sunshine capture value is wlr, not wlgrab
wlgrab is the name the backend logs under, not a valid config value.
Sunshine rejects it, then starts anyway with no encoder — moonlight sees
a 503.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 08:51:55 +00:00
naps62 1cddd495cd feat: alias a=aoe
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 08:44:33 +00:00
naps62 4dcf84d41c feat: per-host claude settings and machine profile
settings.json carries skipDangerousModePermissionPrompt and the rev hook
wiring, so yolo gets its own; other hosts keep the shared one. Machine
profile picks which agent-skills machines/<name>.md is imported.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 08:39:08 +00:00
naps62 032cea0db8 feat: adopt agent-skills, scope aoe config to yolo
Drops the stale skills/commands/CLAUDE.md from home/common/programs/claude
in favour of the agent-skills flake, which is the maintained copy. The
module keeps what agent-skills does not own: packages, statusline and
settings.json.

aoe's config.toml moves to home/yolo — it sets yolo_mode_default, which
starts sessions with permission checks skipped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 08:35:08 +00:00
Miguel Palhas 1f94b29d56 wip
CI / lint (push) Successful in 34s
CI / eval (push) Failing after 1m41s
2026-08-17 09:18:11 +01:00
naps62 352b87192d fix: disable zram on yolo, use aoe-with-web
zram wedged shutdown faulting stored pages back in, and the VM already
has a real swap partition. aoe-with-web is the same binary plus `serve`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 08:12:48 +00:00
naps62 4bea767b2e feat: serial console on yolo
Needed before switching to vga: virtio-gl, which leaves no QEMU console
surface for noVNC or screendump.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 08:05:24 +00:00
naps62 2e23c695a2 feat: install codex cli, add yolo ssh host aliases
cliPackage only points the desktop app at codex; it never put the cli on
PATH, so `codex` was missing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 07:59:34 +00:00
naps62 e0e71a44d1 chore: drop claude-rc
No longer used.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 07:49:39 +00:00
naps62 0501db564d fix: create claude-rc log dir
systemd does not create the parent of StandardOutput=append:, failing
every instance with 209/STDOUT on a fresh machine.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 07:46:26 +00:00
naps62 52618a852a feat: add node and pnpm to the shared dev tooling
nodejs.nix shipped only the language server, so a fresh machine has no
node runtime — rev's clone cannot install its dependencies.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 07:44:08 +00:00
naps62 0fa1a31489 fix: flattened repo layout under ~/tea
Repos moved from ~/tea/<org>/<repo> to ~/tea/<repo>, so the rev and
agent-skills unit paths no longer resolved. Also captures aoe schema keys
added on first run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 07:40:42 +00:00
naps62 bb65e34bca chore: move yolo flake path to ~/tea/nixos-config
Also overrides the home-manager nh.flake, which sets NH_FLAKE and was
still pointing at the ~/projects default, so bare `nh home switch` never
resolved on this host.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 07:38:15 +00:00
naps62-yolo c457df3f03 feat(home): add zed, cursor, and vscodium (#1)
CI / eval (push) Failing after 1m35s
CI / lint (push) Successful in 30s
2026-08-17 07:47:11 +01:00
naps62 7dc2b581d3 feat: declare aoe config as a shared module
Vendors config.toml and moves the package into common/programs/aoe, so
any host that wants aoe imports one thing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 06:46:15 +00:00
naps62 de79327942 fix: write claude-rc@ template as a plain file
home-manager starts every unit it manages, and starting a template with
no instance errors out, failing activation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 06:41:32 +00:00
naps62 77bdbe108d feat: add yolo host
New NixOS VM on proxmox, replacing the Ubuntu box. Reuses the existing
Hyprland config; remote access is Sunshine/Moonlight rather than xrdp,
since xrdp cannot drive a wayland compositor.

Two fixes here are not yolo-specific and affect any fresh install:
git at system level (nix needs it for the type = "git" hyprland input,
but git only came from home-manager, so neither rebuild could run), and
dropping the yogurt input, whose private repo made home-manager
un-evaluatable without GitHub auth.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 06:30:54 +00:00
Miguel Palhas f7947375e3 wip
CI / lint (push) Successful in 33s
CI / eval (push) Failing after 1m37s
2026-08-10 09:49:14 +01:00
Miguel Palhas 3d9c273fd3 wip
CI / lint (push) Successful in 33s
CI / eval (push) Failing after 1m41s
2026-07-30 13:18:47 +01:00
Miguel Palhas 8cfa920ea8 wip
CI / lint (push) Successful in 33s
CI / eval (push) Failing after 1m40s
2026-07-29 16:08:21 +01:00
Miguel Palhas 5ed3026903 updates 2026-07-29 15:49:43 +01:00
62 changed files with 1959 additions and 2343 deletions
Generated
+314 -166
View File
@@ -1,5 +1,41 @@
{
"nodes": {
"agent-of-empires": {
"inputs": {
"crane": "crane",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1786554876,
"narHash": "sha256-akMknOIdX0QsBsM4lgreXSNNym7TNu9iOrDBqrQuTuQ=",
"owner": "agent-of-empires",
"repo": "agent-of-empires",
"rev": "9b0d691a6cdaa6d2451f6eda05e83628c54eb95a",
"type": "github"
},
"original": {
"owner": "agent-of-empires",
"ref": "v1.14.1",
"repo": "agent-of-empires",
"type": "github"
}
},
"agent-skills": {
"locked": {
"lastModified": 1786957004,
"narHash": "sha256-lUyQGAN6Kd5onhPa+ptOiwtIaY6Y02q+nyRt9NWkdDg=",
"ref": "refs/heads/main",
"rev": "7cb03f879600e87281356fdc411b2690f09a9175",
"revCount": 47,
"type": "git",
"url": "https://git.naps.pt/yolo/agent-skills.git"
},
"original": {
"type": "git",
"url": "https://git.naps.pt/yolo/agent-skills.git"
}
},
"aquamarine": {
"inputs": {
"hyprutils": [
@@ -20,11 +56,11 @@
]
},
"locked": {
"lastModified": 1780756231,
"narHash": "sha256-tXQxKdG5716uB9/LIkLQqQwHKf5mRSpHoZhz3lyI2Cg=",
"lastModified": 1784368054,
"narHash": "sha256-zF1iJkBQSDWmRO4/LEeHR1SpKY0lqZaxkoQJpPS9K9U=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "6ecde03f47172753fe5a2f334f9d3facfb7e6784",
"rev": "9b5f14d9483445e766294eb8fbe0b8f370269ed0",
"type": "github"
},
"original": {
@@ -36,14 +72,14 @@
"claude-code": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1781560224,
"narHash": "sha256-+4c90gzrBDnPtTs2B2M5xcDC5h0lN7lOg7dmxlPWteA=",
"lastModified": 1785285785,
"narHash": "sha256-r1cMlvXjRVKe+uQ/GKwy4TpionpmbNgksFP2758D/MM=",
"owner": "sadjow",
"repo": "claude-code-nix",
"rev": "c411244f49e20360939644a2228f6cb0789f97f6",
"rev": "da78262708d858861afbe1f68ea65fedda4054c4",
"type": "github"
},
"original": {
@@ -60,11 +96,11 @@
]
},
"locked": {
"lastModified": 1784171300,
"narHash": "sha256-LiWzndOW88994z4SCnenv+2rKe/ryEgvWSsBjFpNvrc=",
"lastModified": 1785294467,
"narHash": "sha256-mylUWHK2wIw8S07K5hbkrLELnflJkDwsSWz2YFbJzLI=",
"owner": "sadjow",
"repo": "codex-cli-nix",
"rev": "c4b3fc9d761797a813b5f8b1d38a9a81cdba6e45",
"rev": "e4e3b0672bbb8fba7f32fe53cd9c604990970374",
"type": "github"
},
"original": {
@@ -82,11 +118,11 @@
]
},
"locked": {
"lastModified": 1784214799,
"narHash": "sha256-GF6mXG+Lq8k6vWxhKDun1gIe8wtZE5sSh2Po3onZDJE=",
"lastModified": 1786822283,
"narHash": "sha256-RdoFKwNQ2m2zbHnq/QbgLf2lUI9cohsnlMwLfJuaTh0=",
"owner": "ilysenko",
"repo": "codex-desktop-linux",
"rev": "f84913f714067b31577e4af84c5b6e1a8bda8130",
"rev": "e6b51d96ac2b9b5d9adafa852241bd0982972557",
"type": "github"
},
"original": {
@@ -95,9 +131,24 @@
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1771796463,
"narHash": "sha256-9bCDuUzpwJXcHMQYMS1yNuzYMmKO/CCwCexpjWOl62I=",
"owner": "ipetkov",
"repo": "crane",
"rev": "3d3de3313e263e04894f284ac18177bd26169bad",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"ethui": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"rust": "rust",
"utils": "utils"
},
@@ -132,6 +183,42 @@
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1775087534,
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@@ -203,7 +290,7 @@
},
"flake-utils_5": {
"inputs": {
"systems": "systems_6"
"systems": "systems_8"
},
"locked": {
"lastModified": 1731533236,
@@ -227,11 +314,11 @@
]
},
"locked": {
"lastModified": 1781514265,
"narHash": "sha256-JuwVe1E7ISnTf5BBaq43a+wwbE3pojyJzoHN2Mk35UE=",
"lastModified": 1785311662,
"narHash": "sha256-lC5ZlyNMf8wcQnrAzUhYb1p6ndzwEovnXKiMqSTLgUo=",
"owner": "shazow",
"repo": "foundry.nix",
"rev": "a4814804b19b1cbbc6349249b568e6a71d8e6ed7",
"rev": "0eb3d1233237eb4e6f4f45f31c087ee1a16245f1",
"type": "github"
},
"original": {
@@ -240,28 +327,6 @@
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"hyprland",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"hardware": {
"inputs": {
"nixpkgs": [
@@ -269,11 +334,11 @@
]
},
"locked": {
"lastModified": 1781168557,
"narHash": "sha256-LOnLQ2tpYF9gqIDDr3+j3DbpJJr/QCH6zPRT2GzEUOE=",
"lastModified": 1785232496,
"narHash": "sha256-65EQYIRRpTdpH8lUiB6Mvo5uBkG60aBIzAJuALfx+O0=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "6358ff76821101c178e3ab4919a62799bfe3652e",
"rev": "2e790b0a6be8ec2b76174ac0931b8ff11919ec98",
"type": "github"
},
"original": {
@@ -290,11 +355,11 @@
]
},
"locked": {
"lastModified": 1781557312,
"narHash": "sha256-QOIRYSUFSq7L5mY3dZymaVhcnne3tPgoR9riB0WocjA=",
"lastModified": 1785306346,
"narHash": "sha256-DScBkW0fOgpGPK2trNoX3ryLTlaC14+gglFo/BhGJ4g=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c03e4752899e55705dfa63979abd885c582a5c48",
"rev": "e705714e918c3b11affcdd15db2cbe3a070420a0",
"type": "github"
},
"original": {
@@ -311,11 +376,11 @@
]
},
"locked": {
"lastModified": 1782839684,
"narHash": "sha256-vzs4SBgPsK4aNzlJR2PpFwtARazXMOxZonQnDz0YHxk=",
"lastModified": 1783963347,
"narHash": "sha256-r376E2XpakiXwModDHIxlvB6qLq4iFVEq730vxOO4JY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2a37d71bbe69e1522ddabf03a4cea0374958bdbe",
"rev": "a45a7c451455a51ae740ec3bce4024b312809c29",
"type": "github"
},
"original": {
@@ -369,11 +434,11 @@
]
},
"locked": {
"lastModified": 1776426399,
"narHash": "sha256-RUESLKNikIeEq9ymGJ6nmcDXiSFQpUW1IhJ245nL3xM=",
"lastModified": 1782566056,
"narHash": "sha256-haEZcHzYrePnjFOYSWTbxm/Nrla0aPslJfmvdCvqtVc=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "68d064434787cf1ed4a2fe257c03c5f52f33cf84",
"rev": "c6e7b9f673f4360bc813d3dc75028f75ee88d3f8",
"type": "github"
},
"original": {
@@ -393,17 +458,17 @@
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"hyprwire": "hyprwire",
"nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_5",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_5",
"xdph": "xdph"
},
"locked": {
"lastModified": 1781551294,
"narHash": "sha256-xTVp7kSmB2qZExF34oT3DDPDqIetU6nf8CQ/zHPqkUY=",
"lastModified": 1785334807,
"narHash": "sha256-bN0KRhDfwSPqbpgUgWVcQMkuDje+8ghWlm7uUQZzaxc=",
"ref": "refs/heads/main",
"rev": "88262e1f860adc56f528ef68b2909ee33a27186b",
"revCount": 7477,
"rev": "7803e68638c1bebce57cf9ea8da51fd9a1e19edd",
"revCount": 7669,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@@ -447,11 +512,11 @@
]
},
"locked": {
"lastModified": 1776426575,
"narHash": "sha256-KI6nIfVihn/DPaeB5Et46Xg3dkNHrrEtUd5LBBVomB0=",
"lastModified": 1784196523,
"narHash": "sha256-ahtKMGXFJdlQNhatQm1+BBU/pGfGYnAqQt3vWvq4p8s=",
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"rev": "a968d211048e3ed538e47b84cb3649299578f19d",
"rev": "a6ccb6cb112ed5a244c0191fb972347ecfa893e0",
"type": "github"
},
"original": {
@@ -520,7 +585,7 @@
"rose-pine-hyprcursor",
"nixpkgs"
],
"systems": "systems_7"
"systems": "systems_6"
},
"locked": {
"lastModified": 1709914708,
@@ -575,11 +640,11 @@
]
},
"locked": {
"lastModified": 1772462885,
"narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=",
"lastModified": 1782554491,
"narHash": "sha256-+p3MlyN/nqRefcf2IckPlGRUn9+hielqpS9XClbLleM=",
"owner": "hyprwm",
"repo": "hyprtoolkit",
"rev": "9af245a69fa6b286b88ddfc340afd288e00a6998",
"rev": "bdba25ced39ea39ab004a8f31593ba0b0ff1ca35",
"type": "github"
},
"original": {
@@ -600,11 +665,11 @@
]
},
"locked": {
"lastModified": 1780251518,
"narHash": "sha256-fG9xbb1SOAAJ+2kJRakp3ch+BmA/3dEg/K3PoAZTKkw=",
"lastModified": 1784323413,
"narHash": "sha256-XnAVV+H4f8Xdv0yZcSwJ5kCjLyE8fHxPeLX6a3HSrAU=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "40ede2e7bdec80ba5d4c443160d905e9f841ae5f",
"rev": "5f03477ab3a005ff27c527486f551883535aea2f",
"type": "github"
},
"original": {
@@ -674,11 +739,11 @@
]
},
"locked": {
"lastModified": 1782030356,
"narHash": "sha256-h4WpMr455AfRub0FXBaon6Vcpe0waUyJ4GivIW6oyd4=",
"lastModified": 1785046085,
"narHash": "sha256-UiK+mmZJuLWQVhJ5b2wDzogIYWAesyRm6LA3h3Ulh3Y=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "3017088b49efd404f78e3b104f553b97e4af786b",
"rev": "11665045df8b9938ef811a3bfdc65cffb02b4b70",
"type": "github"
},
"original": {
@@ -689,11 +754,57 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1781454065,
"narHash": "sha256-d2xfDjnfRuf/xYGdu9VVRHiav/2w5hDL/5cw2TuVAXw=",
"lastModified": 1781074563,
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9eac87a12312b8f60dd52e1c6e1a265f6fc7f5fc",
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1769909678,
"narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "72716169fe93074c333e8d0173151350670b824c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1774748309,
"narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "333c4e0545a6da976206c74db8773a1645b5870a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1784783405,
"narHash": "sha256-4IHyyLgLBdKefkljdKod4IMn023pQiDXAWJA187cmdY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7525d999cd850b9a488817abc89c75dc733acf17",
"type": "github"
},
"original": {
@@ -703,7 +814,7 @@
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs_3": {
"locked": {
"lastModified": 1764517877,
"narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=",
@@ -719,7 +830,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
@@ -735,33 +846,17 @@
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1780749050,
"narHash": "sha256-3av0pIjlOWQ6rDbNOmpUSvbNnJkGORQKKjb4LtCZsIY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a799d3e3886da994fa307f817a6bc705ae538eeb",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1782723713,
"narHash": "sha256-oPXCU/SSUokcGaJREHibG1CBX3+s/W7orDWQOZDsEeQ=",
"owner": "nixos",
"lastModified": 1784356753,
"narHash": "sha256-12KrbMiWLcf8m7pCvAtZh1ZrgF85ZXDXvfR/fWTKy84=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b5aa0fbd538984f6e3d201be0005b4463d8b09f8",
"rev": "61b7c44c4073f0b827768aff0049561b5110ea5a",
"type": "github"
},
"original": {
"owner": "nixos",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@@ -769,16 +864,48 @@
},
"nixpkgs_6": {
"locked": {
"lastModified": 1751274312,
"narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
"lastModified": 1785090369,
"narHash": "sha256-m0pDuRJG7EDo9ri+4Ksu83VsI+PlxNC9lNBfydejce4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "624af665418d3c65d544145b4d34ad696439570e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1775036866,
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
@@ -790,11 +917,11 @@
]
},
"locked": {
"lastModified": 1781581126,
"narHash": "sha256-GXzO08gNKZsEuVgMhIfuUvc5G4Xh1rNot8KWjZsKNos=",
"lastModified": 1785335804,
"narHash": "sha256-oN3I6Kr71lOCE3/ou4GgY2cQYh4B6xQxZXzomFgYn0s=",
"owner": "noctalia-dev",
"repo": "noctalia-shell",
"rev": "de82488dc60db736acd5bf95fb448405ea99f404",
"rev": "aded31799eb0dffdbcf436243083f1ebce26f95d",
"type": "github"
},
"original": {
@@ -806,22 +933,21 @@
"nvchad-starter": {
"flake": false,
"locked": {
"lastModified": 1782738765,
"narHash": "sha256-/jxBHJ74FYVYm8JGO3ay2J3B2/Rf3/KvroivtJFFJRM=",
"owner": "naps62",
"repo": "nvchad-starter",
"rev": "020bf7716ea1b7d233cbdaef63c8585791f896b7",
"type": "github"
"lastModified": 1786971647,
"narHash": "sha256-RsRq+BRIrpSzDUU6hF+ITwFcjtiIPsFpk220+Civ010=",
"ref": "refs/heads/main",
"rev": "4db90cb097f2358b8adb8c11f116e4201b81d0f6",
"revCount": 178,
"type": "git",
"url": "https://git.naps.pt/naps62/nvim-config.git"
},
"original": {
"owner": "naps62",
"repo": "nvchad-starter",
"type": "github"
"type": "git",
"url": "https://git.naps.pt/naps62/nvim-config.git"
}
},
"nvchad4nix": {
"inputs": {
"flake-utils": "flake-utils_5",
"nixpkgs": [
"nixpkgs"
],
@@ -830,11 +956,11 @@
]
},
"locked": {
"lastModified": 1781363098,
"narHash": "sha256-uhidFg3n92Lh9JKQJQExEPNRe+fTzhC7/G9XebdzSYU=",
"lastModified": 1785121894,
"narHash": "sha256-AWbstkwe4twd+5iWx8QBVzTgwGAUvn4vVdobGKW5BRc=",
"owner": "nix-community",
"repo": "nix4nvchad",
"rev": "55d95057021c5d285d95c5f254006f4fa9c3084b",
"rev": "8135d402aa554b5f8e5dd2ec341c5a440fd18496",
"type": "github"
},
"original": {
@@ -846,18 +972,17 @@
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1778507602,
"narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=",
"lastModified": 1784288435,
"narHash": "sha256-ReRHaLgr/uVqdD8afFSn+myXIfpHeOhP0yYe0TJqAA8=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a",
"rev": "43b3c1ab9d40fb1dbb008f451988a91e375825e9",
"type": "github"
},
"original": {
@@ -868,6 +993,8 @@
},
"root": {
"inputs": {
"agent-of-empires": "agent-of-empires",
"agent-skills": "agent-skills",
"claude-code": "claude-code",
"codex-cli": "codex-cli",
"codex-desktop-linux": "codex-desktop-linux",
@@ -877,14 +1004,14 @@
"home-manager": "home-manager",
"hyprland": "hyprland",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_6",
"noctalia": "noctalia",
"nvchad-starter": "nvchad-starter",
"nvchad4nix": "nvchad4nix",
"rose-pine-hyprcursor": "rose-pine-hyprcursor",
"sem": "sem",
"spicetify-nix": "spicetify-nix",
"systems": "systems_10",
"yogurt": "yogurt",
"zen-browser": "zen-browser"
}
},
@@ -912,7 +1039,7 @@
},
"rust": {
"inputs": {
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1764729618,
@@ -928,6 +1055,45 @@
"type": "github"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1775445266,
"narHash": "sha256-3fgIj85WHQbOamrpIw9WY3ZL1PoEvjPOjmzMYNsEQJo=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "61747bc3cf2da179b9af356ae9e70f3b895b0c24",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sem": {
"inputs": {
"flake-parts": "flake-parts_2",
"flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_7",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1786903203,
"narHash": "sha256-MaISe6TG4I5zb6hSRsBj5ENe5JSh7MjQ+QIDWDhxTo0=",
"owner": "Ataraxy-Labs",
"repo": "sem",
"rev": "ba2dfbbe75836cfe6f69dc036c9060b7ce5cc158",
"type": "github"
},
"original": {
"owner": "Ataraxy-Labs",
"repo": "sem",
"type": "github"
}
},
"spicetify-nix": {
"inputs": {
"nixpkgs": [
@@ -936,11 +1102,11 @@
"systems": "systems_9"
},
"locked": {
"lastModified": 1781425310,
"narHash": "sha256-GTBka4Df/ZOacmisI/DI2LICyNChEqn/giah83LucdM=",
"lastModified": 1785048222,
"narHash": "sha256-LjFVfwxensz76SjnvofF1Jsw+xTLd8Qp31W0J6nh2XI=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
"rev": "aeaf7c81a45d3761da61cb05bfc370ac6d1b0441",
"rev": "17e524f330c282d31c32dfe076222d4a12277886",
"type": "github"
},
"original": {
@@ -1040,21 +1206,6 @@
}
},
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_7": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@@ -1069,6 +1220,21 @@
"type": "github"
}
},
"systems_7": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_8": {
"locked": {
"lastModified": 1681028828,
@@ -1119,7 +1285,7 @@
},
"utils_2": {
"inputs": {
"systems": "systems_8"
"systems": "systems_7"
},
"locked": {
"lastModified": 1710146030,
@@ -1163,11 +1329,11 @@
]
},
"locked": {
"lastModified": 1780133819,
"narHash": "sha256-0YPKIY3dlnR7SPq7Z8ekFVvzFsfeiAtEj+QUI3KHrlI=",
"lastModified": 1784371182,
"narHash": "sha256-S8A1lezEalltWcCp3gAic5lssS0xTSISK6fKODefhOk=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "4a170c0ba96fd37374f93d8f91c9ed91814828ac",
"rev": "08d99f727944dd15e4740090305e31c5fb92a50a",
"type": "github"
},
"original": {
@@ -1176,24 +1342,6 @@
"type": "github"
}
},
"yogurt": {
"inputs": {
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1783264766,
"narHash": "sha256-1iD8gdvxBYBfffHhNsnZPnPGDDttYVRUhghLbAa1Mho=",
"ref": "refs/heads/main",
"rev": "515ab16c76fc0779a1c6be93cfa1424a901373cb",
"revCount": 67,
"type": "git",
"url": "https://github.com/ZePedroResende/yogurt"
},
"original": {
"type": "git",
"url": "https://github.com/ZePedroResende/yogurt"
}
},
"zen-browser": {
"inputs": {
"home-manager": "home-manager_2",
@@ -1202,11 +1350,11 @@
]
},
"locked": {
"lastModified": 1783190846,
"narHash": "sha256-UcdKHKcDxLxBon0HsOjDRRA7l1vVT28R83LkCIAlYYc=",
"lastModified": 1785224333,
"narHash": "sha256-8DNJUVM10ktK02V9ZIV064CH+fuPF272VCAZBn6arig=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "0758bc86f7a55bbe002f0cede9e1a49e5a6e34d9",
"rev": "5f1a4be4d280e1ae06d61a75775a234b1714da3f",
"type": "github"
},
"original": {
+11 -2
View File
@@ -21,7 +21,7 @@
inputs.nvchad-starter.follows = "nvchad-starter";
};
nvchad-starter = {
url = "github:naps62/nvchad-starter";
url = "git+https://git.naps.pt/naps62/nvim-config.git";
flake = false;
};
foundry = {
@@ -66,7 +66,14 @@
url = "github:ilysenko/codex-desktop-linux";
inputs.nixpkgs.follows = "nixpkgs";
};
yogurt.url = "git+https://github.com/ZePedroResende/yogurt";
# Pinned to the tag, and pins its own nixpkgs for the same reason ethui does
# — it is a verified Rust build. Bump deliberately, not via `flake update`.
agent-of-empires.url = "github:agent-of-empires/agent-of-empires/v1.14.1";
# Semantic-diff tool rev calls via REV_SEM_BIN. NOT nixpkgs' `sem`, which is
# the unrelated Semaphore CI cli.
sem.url = "github:Ataraxy-Labs/sem";
# Claude Code + Codex skills, commands, hooks and CLAUDE.md fragments.
agent-skills.url = "git+https://git.naps.pt/yolo/agent-skills.git";
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
@@ -124,6 +131,7 @@
nixosConfigurations = {
arrakis = mkNixOS "arrakis";
konishi = mkNixOS "konishi";
yolo = mkNixOS "yolo";
};
# Named "<user>@<host>" so `nh home switch` auto-detects them
@@ -131,6 +139,7 @@
homeConfigurations = {
"naps62@arrakis" = mkHome "arrakis" x86;
"naps62@konishi" = mkHome "konishi" x86;
"naps62@yolo" = mkHome "yolo" x86;
};
devShells =
+24 -17
View File
@@ -20,30 +20,37 @@
custom.hyprland.cursorSize = 32;
# Fingerprint unlock for hyprlock — arrakis is the only host with a reader
# (fprintd is enabled system-side in hosts/arrakis). hyprlock talks to fprintd
# over D-Bus directly (not via PAM), running in parallel with password input:
# type the password or touch the sensor. Enroll first with `fprintd-enroll`.
programs.hyprlock.settings.auth.fingerprint = {
enabled = true;
ready_message = "Scan fingerprint to unlock";
present_message = "Scanning...";
retries = 3;
};
# Moonlight: client for the Sunshine server on konishi (stream games to this laptop).
custom.gaming.moonlight = true;
# RetroArch (bare — cores/ROMs added by hand, WebDAV configured in-app).
custom.gaming.retroarch = true;
wayland.windowManager.hyprland.settings = {
exec-once = [
];
wayland.windowManager.hyprland.extraConfig = ''
hl.workspace_rule({ workspace = "1", monitor = "DP-3" })
hl.workspace_rule({ workspace = "2", monitor = "eDP-1" })
hl.workspace_rule({ workspace = "3", monitor = "eDP-1" })
hl.workspace_rule({ workspace = "4", monitor = "eDP-1" })
workspace = [
"1, monitor:DP-3"
"2, monitor:eDP-1"
"3, monitor:eDP-1"
"4, monitor:eDP-1"
];
windowrule = [
"no_initial_focus on, match:class bevy-.*"
"float on, match:class bevy-.*"
"size 800 600, match:class bevy-.*"
"move 100%-800 100%-600, match:class bevy-.*"
];
};
hl.window_rule({
match = { class = "bevy-.*" },
no_initial_focus = true,
float = true,
size = "800 600",
move = "100%-800 100%-600",
})
'';
# v4 `bar.density` has no v5 equivalent; spacing is tuned via
# bar.main.padding / widget_spacing / thickness if needed.
+8 -9
View File
@@ -1,12 +1,11 @@
_:
{
wayland.windowManager.hyprland.settings = {
monitor = [
"eDP-1, preferred, 0x0, 1, bitdepth, 8"
"DP-1, preferred, auto-up, 1"
"DP-2, preferred, auto-up, 1"
"DP-3, preferred, auto-up, 1"
"DP-4, preferred, auto-up, 1"
];
};
# Hyprland 0.55+ is Lua-only (see home/common/programs/hyprland).
wayland.windowManager.hyprland.extraConfig = ''
hl.monitor({ output = "eDP-1", mode = "preferred", position = "0x0", scale = 1, bitdepth = 8 })
hl.monitor({ output = "DP-1", mode = "preferred", position = "auto-up", scale = 1 })
hl.monitor({ output = "DP-2", mode = "preferred", position = "auto-up", scale = 1 })
hl.monitor({ output = "DP-3", mode = "preferred", position = "auto-up", scale = 1 })
hl.monitor({ output = "DP-4", mode = "preferred", position = "auto-up", scale = 1 })
'';
}
+15
View File
@@ -0,0 +1,15 @@
{
pkgs,
inputs,
...
}:
# Agent of Empires: the agent session manager. The package only — settings are
# per-host, because config.toml carries `yolo_mode_default`, which decides
# whether sessions start with permission checks skipped.
{
# aoe-with-web, not default: same single `aoe` binary plus the `serve`
# subcommand (web dashboard). The default build has no `serve` at all.
home.packages = [ inputs.agent-of-empires.packages.${pkgs.system}.aoe-with-web ];
home.shellAliases.a = "aoe";
}
-1
View File
@@ -1 +0,0 @@
Screenshots: stored in ~/downloads/screenshots, with date time in the filename
@@ -1,20 +0,0 @@
Download a music playlist for "aulas de música" (kids music classes).
The user will paste the content of a monthly playlist from the teacher. Extract all URLs (SoundCloud and YouTube links, which may be split across multiple lines) and download them as MP3 files.
## Steps
1. Parse the pasted content to extract all URLs. Links are often split across lines — reconstruct them by joining consecutive lines that form a single URL.
2. Determine the month name from the content (e.g., "Creche - março" → "marco").
3. Create the folder `aulas-musica-{month}` in the current directory.
4. Download all tracks as MP3 using yt-dlp via nix-shell:
```
TMPDIR=/tmp nix-shell -p yt-dlp ffmpeg --run 'cd <folder> && yt-dlp -x --audio-format mp3 -o "%(title)s.%(ext)s" <urls>'
```
5. List the downloaded files to confirm everything worked.
## Important
- Always use `TMPDIR=/tmp` before `nix-shell` (NixOS sandbox compatibility).
- Always use `dangerouslyDisableSandbox: true` for the download command.
- Reconstruct URLs carefully — SoundCloud short links and YouTube links are often broken across 2 lines in the pasted content.
@@ -1,20 +0,0 @@
Merge a branch from the worktree.
If you're currently working on a worktree, assume that's the one I'm referring to.
Start by committing any staged and unstaged changes. I may have made changes to the worktree manually.
Then merge back the new main branch, since I may have made changes to it.
# Language specific:
## Rust
Ensure cargo check is happy.
Ensure clippy is happy. clean up any new warnings.
## Typescript
Ensure tsc is happy.
# Finally
Squash the commits into a single one, merge into the base branch, and delete the worktree.
@@ -1,6 +0,0 @@
This command should only work while in a secondary branch (not main or master).
Commit any unstaged changes
Fetch updates from the origin repo
If there are new commits on the parent branch (typically origin/main), then merge them back into the current branch
Solve any conflicts, and analyze the incoming changes to see if additional changes are required to the branch's code (e.g.: if something was renamed in the meantime in main, our new code may need to be adjusted)
+2 -31
View File
@@ -12,6 +12,8 @@ let
};
in
{
imports = [ inputs.agent-skills.homeModules.default ];
# Shared UI-scale knob for the Electron AI desktop apps (Claude Desktop, T3 Code).
# Set per-host (e.g. konishi's 4K@1x monitors want ~"1.5"); null = native scale.
options.custom.aiApps.deviceScaleFactor = lib.mkOption {
@@ -46,46 +48,15 @@ in
@beads/bd
'';
# Commands
".claude/commands/merge.md".source = ./commands/merge.md;
".claude/commands/update.md".source = ./commands/update.md;
".claude/commands/download-playlist.md".source = ./commands/download-playlist.md;
# Skills: agents
".claude/skills/designer-bold/SKILL.md".source = ./skills/designer-bold/SKILL.md;
".claude/skills/designer/SKILL.md".source = ./skills/designer/SKILL.md;
".claude/skills/frontend-design/SKILL.md".source = ./skills/frontend-design/SKILL.md;
".claude/skills/analyze-branch/SKILL.md".source = ./skills/analyze-branch/SKILL.md;
".claude/skills/oracle/SKILL.md".source = ./skills/oracle/SKILL.md;
".claude/skills/librarian/SKILL.md".source = ./skills/librarian/SKILL.md;
# Skills: knowledge
".claude/skills/git-master/SKILL.md".source = ./skills/git-master/SKILL.md;
".claude/skills/planning-with-files/SKILL.md".source =
./skills/planning-with-files/SKILL.md;
".claude/skills/react-patterns/SKILL.md".source = ./skills/react-patterns/SKILL.md;
".claude/skills/vercel-react-best-practices/SKILL.md".source =
./skills/vercel-react-best-practices/SKILL.md;
# Skills: workflows
".claude/skills/smart-debug/SKILL.md".source = ./skills/smart-debug/SKILL.md;
".claude/skills/tdd-cycle/SKILL.md".source = ./skills/tdd-cycle/SKILL.md;
".claude/skills/security-scan/SKILL.md".source = ./skills/security-scan/SKILL.md;
".claude/skills/issue/SKILL.md".source = ./skills/issue/SKILL.md;
".claude/skills/remove-deadcode/SKILL.md".source = ./skills/remove-deadcode/SKILL.md;
".claude/skills/worktree-compare/SKILL.md".source = ./skills/worktree-compare/SKILL.md;
".claude/skills/worktree-list/SKILL.md".source = ./skills/worktree-list/SKILL.md;
# Skills: linear workflow
".claude/skills/linear-common/COMMON.md".source = ./skills/linear-common/COMMON.md;
".claude/skills/work/SKILL.md".source = ./skills/work/SKILL.md;
".claude/skills/yolo/SKILL.md".source = ./skills/yolo/SKILL.md;
".claude/statusline.sh" = {
source = ./statusline.sh;
executable = true;
};
".claude/CLAUDE.md".source = ./CLAUDE.md;
};
mutableFiles.".claude/settings.json".source = ./settings.json;
+2 -1
View File
@@ -81,5 +81,6 @@
"type": "http",
"url": "https://ha-mcp.n62.casa/mcp"
}
}
},
"agentPushNotifEnabled": true
}
@@ -1,91 +0,0 @@
---
description: Fast branch analysis - review changes for bugs, performance, security, and architecture issues
---
# Analyze Branch
Analyze the current branch relative to the base branch and generate a detailed report in `reports/` focusing on:
- Critical bugs (null safety, SQL injection, type errors)
- N+1 queries and performance issues
- Security vulnerabilities
- Breaking changes (caller analysis)
- Database migration risks
- Architecture (SOLID/DRY)
Create the `reports/` directory if missing. Create/overwrite ONE report file in that directory.
## Constraints (CRITICAL)
- DO NOT execute commands that modify the repository or history.
- DO NOT execute commands that modify dependencies or runtime state.
- The only allowed write operation is the report file in `reports/`.
## Input
You may receive a branch/ref as an argument. If absent or empty, use the **current branch**.
## Procedure
### Step 1: Git Context
```bash
CURRENT=$(git branch --show-current)
BASE=$(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null)
git diff --name-only $BASE..HEAD
git diff --stat $BASE..HEAD
```
### Step 2: Analyze Changed Files
For each changed file:
1. Read the full diff: `git diff $BASE..HEAD -- <file>`
2. Read surrounding context in the file
3. Check for issues listed above
### Step 3: Cross-Reference
- Check callers of modified functions (grep for function names across codebase)
- Check if modified database queries have proper indexes
- Check if new endpoints have authentication/authorization
- Check if error handling covers new failure modes
### Step 4: Generate Report
Write report to `reports/branch-analysis-<branch-name>.md`:
```markdown
# Branch Analysis: <branch-name>
**Date**: <date>
**Base**: <base-branch>
**Files Changed**: <count>
**Risk Score**: <LOW|MEDIUM|HIGH|CRITICAL>
## Summary
<1-3 sentence overview>
## Critical Findings
### <Finding Title>
- **Severity**: CRITICAL|HIGH|MEDIUM|LOW
- **File**: path/to/file:line
- **Issue**: Description
- **Suggestion**: How to fix
## Performance
<N+1 queries, missing indexes, expensive operations>
## Security
<Auth gaps, injection risks, data exposure>
## Breaking Changes
<API changes, schema changes, removed exports>
## Architecture
<SOLID violations, DRY issues, complexity>
```
### Step 5: Summary
Print the risk score and top 3 findings to stdout after writing the report.
$ARGUMENTS
@@ -1,69 +0,0 @@
---
description: Opinionated UI/UX specialist for distinctive, visually striking interfaces. Anti-generic-AI aesthetics. Bold typography, asymmetric layouts, intentional color.
---
You are Designer Bold - a frontend UI/UX specialist who creates intentional, polished, DISTINCTIVE experiences.
**Role**: Craft cohesive UI/UX that balances visual impact with usability. Every interface should be memorable and deliberately designed for its context.
## Design Principles
**Typography**
- Choose distinctive, characterful fonts that elevate aesthetics
- Avoid generic defaults (Arial, Inter, Roboto, system fonts) -- opt for unexpected, beautiful choices
- Pair a display font with a refined body font for hierarchy
- Never converge on common AI choices (Space Grotesk) across designs
**Color & Theme**
- Commit to a cohesive aesthetic with clear color variables
- Dominant colors with sharp accents > timid, evenly-distributed palettes
- Create atmosphere through intentional color relationships
- Vary between light and dark themes -- no design should look the same
**Motion & Interaction**
- Leverage framework animation utilities when available (Tailwind's transition/animation classes)
- Focus on high-impact moments: orchestrated page loads with staggered reveals
- Use scroll-triggers and hover states that surprise and delight
- One well-timed animation > scattered micro-interactions
- Drop to custom CSS/JS only when utilities can't achieve the vision
**Spatial Composition**
- Break conventions: asymmetry, overlap, diagonal flow, grid-breaking
- Generous negative space OR controlled density -- commit to the choice
- Unexpected layouts that guide the eye
**Visual Depth**
- Create atmosphere beyond solid colors: gradient meshes, noise textures, geometric patterns
- Layer transparencies, dramatic shadows, decorative borders
- Contextual effects that match the aesthetic (grain overlays, custom cursors)
**Styling Approach**
- Default to Tailwind CSS utility classes when available -- fast, maintainable, consistent
- Use custom CSS when the vision requires it: complex animations, unique effects, advanced compositions
- Balance utility-first speed with creative freedom where it matters
**Match Vision to Execution**
- Maximalist designs -> elaborate implementation, extensive animations, rich effects
- Minimalist designs -> restraint, precision, careful spacing and typography
- Elegance comes from executing the chosen vision fully, not halfway
## Design Thinking
Before coding, understand the context and commit to a BOLD aesthetic direction:
- **Purpose**: What problem does this interface solve? Who uses it?
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian
- **Constraints**: Technical requirements (framework, performance, accessibility)
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
## Constraints
- Respect existing design systems when present
- Leverage component libraries where available
- Prioritize visual excellence -- code perfection comes second
## Skills
- When implementing React components, use `/react-patterns` for code examples of composition, compound components, hooks, and accessibility patterns.
- When optimizing performance, use `/vercel-react-best-practices` for Vercel's 45 prioritized performance rules.
You are capable of extraordinary creative work. Commit fully to distinctive visions and show what's possible when breaking conventions thoughtfully.
$ARGUMENTS
@@ -1,84 +0,0 @@
---
description: Conventional frontend specialist. React 18+, Tailwind CSS, TypeScript, accessibility (WCAG 2.1 AA), responsive design, performance optimization.
---
You are Designer - a frontend specialist focused on building production-grade, accessible, performant interfaces.
## Core Stack
- **React 18+**: Server Components, Suspense, useTransition, useDeferredValue
- **TypeScript**: Strict mode, no implicit any, explicit return types on exports
- **Tailwind CSS**: Utility-first, design tokens via CSS variables, responsive with mobile-first breakpoints
- **Accessibility**: WCAG 2.1 AA compliance from the start, not bolted on after
## Component Architecture
- **Composition over inheritance**: Build from small, focused components
- **Compound components**: Use Context for implicit state sharing (Tabs, Accordion, Menu)
- **Error boundaries**: Wrap critical UI sections with fallback UIs
- **Single responsibility**: Each component does one thing well
- **Props**: Use TypeScript interfaces, prefer explicit props over spreading
## Accessibility
- Semantic HTML first (button, nav, main, article, aside, header, footer)
- Keyboard navigation for all interactive elements
- Focus management for modals, dialogs, and dynamic content
- ARIA attributes only when semantic HTML is insufficient
- Color contrast: minimum 4.5:1 for normal text, 3:1 for large text
- Touch targets: minimum 44x44px on mobile
- Screen reader testing considerations in component design
## Performance Targets
- Largest Contentful Paint (LCP): < 2.5s
- First Input Delay (FID): < 100ms
- Cumulative Layout Shift (CLS): < 0.1
- Bundle size awareness: code split at route boundaries, lazy load below-the-fold
## Performance Patterns
- `React.memo` for expensive pure components
- `useMemo` for expensive calculations, `useCallback` for stable references passed to children
- Code splitting with `React.lazy` and `Suspense` at route and feature boundaries
- Virtualization for long lists (@tanstack/react-virtual)
- Image optimization: lazy loading, proper dimensions, modern formats (WebP/AVIF)
- Eliminate render waterfalls: parallel data fetching, avoid sequential awaits
## Styling Approach
- Tailwind utility classes as default
- CSS variables for theme tokens (colors, spacing, typography scale)
- Responsive: mobile-first with sm/md/lg/xl breakpoints
- Dark mode via Tailwind's `dark:` variant with system preference detection
- Animation: CSS transitions for simple effects, Framer Motion for complex orchestration
- Consistent spacing scale, consistent border-radius, consistent shadow levels
## State Management
- Local state (`useState`) for component-scoped state
- Context + `useReducer` for shared state within a feature
- URL state for anything that should be shareable/bookmarkable
- Server state via React Query / SWR / Server Components
- Avoid prop drilling beyond 2 levels -- lift to Context or compose differently
## TypeScript Conventions
- PascalCase for components, interfaces, types
- camelCase for functions, variables, hooks
- Props interfaces named `ComponentNameProps`
- Prefer `interface` for component props, `type` for unions/intersections
- No `any` -- use `unknown` and narrow with type guards
## Testing Considerations
- Components should be testable with React Testing Library
- Test behavior, not implementation details
- Accessible queries first: getByRole, getByLabelText, getByText
## Skills
- When implementing React components, use `/react-patterns` for code examples of composition, compound components, hooks, and accessibility patterns.
- When optimizing performance, use `/vercel-react-best-practices` for Vercel's 45 prioritized performance rules across 8 categories.
$ARGUMENTS
@@ -1,42 +0,0 @@
---
name: frontend-design
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
license: Complete terms in LICENSE.txt
---
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
## Design Thinking
Before coding, understand the context and commit to a BOLD aesthetic direction:
- **Purpose**: What problem does this interface solve? Who uses it?
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
- **Constraints**: Technical requirements (framework, performance, accessibility).
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
- Production-grade and functional
- Visually striking and memorable
- Cohesive with a clear aesthetic point-of-view
- Meticulously refined in every detail
## Frontend Aesthetics Guidelines
Focus on:
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
@@ -1,215 +0,0 @@
---
description: "Git expert for atomic commits, rebase/squash, and history search (blame, bisect, log -S). Use for: commit, rebase, squash, who wrote, when was X added, find the commit that."
---
# Git Master
You are a Git expert combining three specializations:
1. **Commit Architect**: Atomic commits, dependency ordering, style detection
2. **Rebase Surgeon**: History rewriting, conflict resolution, branch cleanup
3. **History Archaeologist**: Finding when/where specific changes were introduced
---
## MODE DETECTION (FIRST STEP)
Analyze the user's request to determine operation mode:
| User Request Pattern | Mode | Jump To |
|---------------------|------|---------|
| "commit", changes to commit | `COMMIT` | Phase 0-6 |
| "rebase", "squash", "cleanup history" | `REBASE` | Phase R1-R4 |
| "find when", "who changed", "git blame", "bisect" | `HISTORY_SEARCH` | Phase H1-H3 |
**CRITICAL**: Don't default to COMMIT mode. Parse the actual request.
---
## CORE PRINCIPLE: MULTIPLE COMMITS BY DEFAULT (NON-NEGOTIABLE)
**ONE COMMIT = AUTOMATIC FAILURE**
Your DEFAULT behavior is to CREATE MULTIPLE COMMITS.
**HARD RULE:**
```
3+ files changed -> MUST be 2+ commits (NO EXCEPTIONS)
5+ files changed -> MUST be 3+ commits (NO EXCEPTIONS)
10+ files changed -> MUST be 5+ commits (NO EXCEPTIONS)
```
**SPLIT BY:**
| Criterion | Action |
|-----------|--------|
| Different directories/modules | SPLIT |
| Different component types (model/service/view) | SPLIT |
| Can be reverted independently | SPLIT |
| Different concerns (UI/logic/config/test) | SPLIT |
| New file vs modification | SPLIT |
**ONLY COMBINE when ALL of these are true:**
- EXACT same atomic unit (e.g., function + its test)
- Splitting would literally break compilation
- You can justify WHY in one sentence
---
## PHASE 0: Parallel Context Gathering (MANDATORY FIRST STEP)
Execute ALL of the following commands IN PARALLEL:
```bash
# Group 1: Current state
git status
git diff --staged --stat
git diff --stat
# Group 2: History context
git log -30 --oneline
git log -30 --pretty=format:"%s"
# Group 3: Branch context
git branch --show-current
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
git rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo "NO_UPSTREAM"
git log --oneline $(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null)..HEAD 2>/dev/null
```
---
## PHASE 1: Style Detection (BLOCKING OUTPUT)
### Commit Style Classification
| Style | Pattern | Example |
|-------|---------|---------|
| `SEMANTIC` | `type: message` or `type(scope): message` | `feat: add login` |
| `PLAIN` | Just description, no prefix | `Add login feature` |
| `SENTENCE` | Full sentence style | `Implemented the new login flow` |
| `SHORT` | Minimal keywords | `format`, `lint` |
**You MUST output the detected style before proceeding.**
---
## PHASE 2: Branch Context Analysis
Determine branch state and rewrite safety:
- On main/master -> NEVER rewrite, only new commits
- All commits local (not pushed) -> Safe for aggressive rewrite
- Pushed but not merged -> Careful rewrite, warn about force push
---
## PHASE 3: Atomic Unit Planning (BLOCKING OUTPUT)
### Calculate Minimum Commit Count FIRST
```
min_commits = ceil(file_count / 3)
```
### Split Rules
1. **Directory/Module FIRST**: Different directories = Different commits
2. **Concern SECOND**: Within same directory, split by logical concern
3. **Test pairing**: Test files MUST be in same commit as implementation
### MANDATORY JUSTIFICATION
For each commit with 3+ files, write ONE sentence explaining why they MUST be together.
**Output commit plan before proceeding to execution.**
---
## PHASE 4: Commit Strategy Decision
```
FIXUP if:
- Change complements existing commit's intent
- Same feature, fixing bugs or adding missing parts
NEW COMMIT if:
- New feature or capability
- Independent logical unit
- No suitable target commit exists
```
---
## PHASE 5: Commit Execution
For each commit group, in dependency order:
```bash
git add <files>
git diff --staged --stat
git commit -m "<message-matching-detected-style>"
git log -1 --oneline
```
---
## PHASE 6: Verification & Cleanup
```bash
git status
git log --oneline $(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master)..HEAD
```
---
# REBASE MODE (Phase R1-R4)
## R1: Context & Safety
- On main/master -> ABORT
- Dirty working directory -> Stash first
- Pushed commits -> Will require force-push; confirm
## R2: Execution
- **Squash**: `git reset --soft $MERGE_BASE && git commit -m "..."`
- **Autosquash**: `GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash $MERGE_BASE`
- **Rebase onto**: `git fetch origin && git rebase origin/main`
- **Conflicts**: Read file, resolve, `git add`, `git rebase --continue`
## R3: Verification
```bash
git status
git log --oneline $(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master)..HEAD
git diff ORIG_HEAD..HEAD --stat
```
## R4: Push Strategy
- Never pushed -> `git push -u origin <branch>`
- Already pushed -> `git push --force-with-lease origin <branch>`
---
# HISTORY SEARCH MODE (Phase H1-H3)
## H1: Search Type Detection
| Goal | Command |
|------|---------|
| When was "X" added? | `git log -S "X" --oneline` |
| When was "X" removed? | `git log -S "X" --all --oneline` |
| What commits touched "X"? | `git log -G "X" --oneline` |
| Who wrote line N? | `git blame -L N,N file.py` |
| When did bug start? | `git bisect start && git bisect bad && git bisect good <tag>` |
| File history | `git log --follow -- path/file.py` |
| Find deleted file | `git log --all --full-history -- "**/filename"` |
## H2: Execute search and gather results
## H3: Present results with actionable context
---
## Anti-Patterns (AUTOMATIC FAILURE)
1. **NEVER make one giant commit** - 3+ files MUST be 2+ commits
2. **NEVER default to semantic commits** - detect from git log first
3. **NEVER separate test from implementation** - same commit always
4. **NEVER group by file type** - group by feature/module
5. **NEVER rewrite pushed history** without explicit permission
$ARGUMENTS
@@ -1,33 +0,0 @@
---
description: Analyze and fix a GitHub issue end-to-end (plan, branch, implement, test, PR)
---
Please analyze and fix the GitHub issue: $ARGUMENTS.
Follow these steps:
# PLAN
1. Use `gh issue view` to get the issue details
2. Understand the problem described in the issue
3. Ask clarifying questions if necessary
4. Understand the prior art for this issue
- Search PRs to see if you can find history on this issue
- Search the codebase for relevant files
5. Think harder about how to break the issue down into a series of small, manageable tasks.
6. Document your plan
# CREATE
- Create a new branch for the issue
- Solve the issue in small, manageable steps, according to your plan.
- Commit your changes after each step.
# TEST
- Write tests to describe the expected behavior of your code
- Run the full test suite to ensure you haven't broken anything
- If the tests are failing, fix them
- Ensure that all tests are passing before moving on to the next step
# DEPLOY
- Open a PR and request a review.
Prefer the GitHub CLI (`gh`) for GitHub-related tasks.
@@ -1,38 +0,0 @@
---
description: Research specialist for external documentation, library APIs, and open source examples. READ-ONLY.
---
You are Librarian - a research specialist for codebases and documentation.
**Role**: Multi-repository analysis, official docs lookup, GitHub examples, library research.
**Capabilities**:
- Search and analyze external repositories
- Find official documentation for libraries
- Locate implementation examples in open source
- Understand library internals and best practices
**Tools to Use**:
- WebSearch: Search the web for documentation and examples
- WebFetch: Fetch and analyze specific documentation pages
- Grep/Glob: Search the local codebase for usage patterns
**Request Types**:
1. **Conceptual**: "How does X work?" - Explain architecture and design decisions
2. **Implementation**: "How do I use X?" - Provide code examples and API signatures
3. **Context**: "What's the best practice for X?" - Compare approaches with tradeoffs
4. **Comprehensive**: "Tell me everything about X" - Full deep-dive with sources
**Behavior**:
- Provide evidence-based answers with sources
- Quote relevant code snippets
- Link to official docs when available
- Distinguish between official and community patterns
**Constraints**:
- READ-ONLY: Research and report, don't implement
- Always cite sources
- Distinguish between stable APIs and experimental features
$ARGUMENTS
@@ -1,116 +0,0 @@
# Linear Common - Shared Config & Setup
This document is referenced by the `/work` and `/yolo` skills. Do not invoke it directly.
## Project config
Look for `.claude/linear.json` in the current git repo root (`git rev-parse --show-toplevel`). If it doesn't exist, run **First-time setup** below, then continue.
### Schema
```json
{
"org": "ern",
"team": "Ern",
"project": "Contracts v2",
"defaultBranch": "main",
"commitScope": "platform",
"buildCommand": "forge test",
"setupCommands": ["bun install"],
"contextFiles": ["docs/README.md"],
"prReviewers": [],
"labels": []
}
```
| Field | Required | Description |
|---|---|---|
| `org` | yes | Linear organization slug |
| `team` | yes | Linear team name (for listing/creating issues) |
| `project` | no | Linear project name (narrows issue search) |
| `defaultBranch` | no | Base branch, default `main` |
| `commitScope` | no | Conventional commit scope, e.g. `platform` -> `feat(platform): ...` |
| `buildCommand` | no | Command to verify the build. Run after implementation. |
| `setupCommands` | no | Commands to run inside a new worktree (install deps, etc.) |
| `contextFiles` | no | Files to read before coding (specs, architecture docs) |
| `prReviewers` | no | GitHub usernames to request reviews from (`/work` only) |
| `labels` | no | Default Linear labels for ad-hoc issues |
### First-time setup
If `.claude/linear.json` doesn't exist:
1. Ask the user for: `org`, `team`, and optionally `project`.
2. Ask which optional fields they want. Show the table above.
3. Write the file. Suggest they commit it or gitignore it depending on preference.
4. Continue with the task.
## Linear MCP auth
The Linear MCP server supports one org at a time. Before making Linear API calls, verify the current auth matches the configured `org`. If it doesn't (or if auth fails), tell the user to re-authenticate via `mcp__linear-server__authenticate` and stop. Don't try to work around auth issues silently.
## Task selection
Based on `$ARGUMENTS`:
### Linear issue ID provided (e.g. `ERN-347`)
1. Fetch the issue via Linear MCP (`get_issue`).
2. Read the full description, acceptance criteria, and comments.
### Ad-hoc task description provided (free text, not matching an issue ID pattern)
1. Create a new Linear issue in the configured team (and project if set).
2. Apply any configured default `labels`.
3. Use the provided text as the issue title. If it's long, summarize for the title and use the full text as description.
### No argument (auto-pick)
1. List issues in the configured team/project that are unstarted (Backlog, Todo, Ready, or equivalent).
2. Pick the highest-priority unblocked issue.
3. If none found, tell the user and stop.
**In all cases:**
- Move the issue to "In Progress" immediately.
- Note the issue ID, title, and `gitBranchName` for later use.
- Use `gitBranchName` from the Linear response for branch naming (auto-links in Linear).
## Worktree setup
### Already in a worktree
Detect by checking `git worktree list` — if the current working directory is not the main worktree, you're already in one.
If already in a worktree: stay here. Check out the issue branch if the current branch doesn't match.
### Not in a worktree
1. Create a worktree at `worktrees/<branch-name>` relative to the repo root.
- Use `gitBranchName` from Linear. If unavailable, derive a concise name from the issue title.
- Do NOT include "claude" in branch names.
2. `cd` into the worktree.
3. Run each command in `setupCommands` from the config.
4. Set kitty tab title (silently skip if kitty isn't available):
```
kitty @ set-tab-title "<repo>/<branch>" 2>/dev/null || true
```
## Gather context
1. Read all `contextFiles` from the config.
2. Re-read the Linear issue description (with project context you'll understand it better now).
3. Read `CLAUDE.md` / `AGENTS.md` at the repo root or `.claude/` if they exist, for project conventions.
4. Check recent git history: `git log --oneline -20` to understand current patterns.
## Implementation guidelines
1. Work methodically through the requirements.
2. Commit after each logical step using conventional commits:
- With scope if configured: `feat(scope): description`
- Without: `feat: description`
- Prefixes: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`
3. Follow existing code patterns. Match the style of surrounding code.
4. Write tests appropriate to the project (match existing test patterns and coverage level).
5. Never amend commits — always create new ones.
6. Keep the Linear issue updated if scope changes significantly.
## Rules
- **Never ask the user** during autonomous work unless you hit a genuine blocker (architectural contradiction, missing credentials, ambiguous requirements that could go very wrong).
- **If the build fails**, fix it before pushing.
- **Respect existing project conventions** from CLAUDE.md, AGENTS.md, etc.
@@ -1,30 +0,0 @@
---
description: Strategic technical advisor. Architecture decisions, debugging strategy, code review guidance. READ-ONLY.
---
You are Oracle - a strategic technical advisor.
**Role**: High-IQ debugging, architecture decisions, code review, and engineering guidance.
**Capabilities**:
- Analyze complex codebases and identify root causes
- Propose architectural solutions with tradeoffs
- Review code for correctness, performance, and maintainability
- Guide debugging when standard approaches fail
**Behavior**:
- Be direct and concise
- Provide actionable recommendations
- Explain reasoning briefly
- Acknowledge uncertainty when present
**Constraints**:
- READ-ONLY: You advise, you don't implement
- Focus on strategy, not execution
- Point to specific files/lines when relevant
**Skills**:
- When advising on git strategy, use `/git-master` for reference on atomic commits, rebase strategy, and history search techniques.
- When planning complex multi-step tasks, use `/planning-with-files` for structured planning methodology.
$ARGUMENTS
@@ -1,95 +0,0 @@
---
description: Structured planning with persistent markdown files for complex tasks, multi-step projects, and research.
---
# Planning with Files
Use persistent markdown files as your "working memory on disk."
## Quick Start
Before ANY complex task:
1. **Create `task_plan.md`** in the working directory
2. **Define phases** with checkboxes
3. **Update after each phase** - mark [x] and change status
4. **Read before deciding** - refresh goals in attention window
## The 3-File Pattern
For every non-trivial task, create THREE files:
| File | Purpose | When to Update |
|------|---------|----------------|
| `task_plan.md` | Track phases and progress | After each phase |
| `notes.md` | Store findings and research | During research |
| `[deliverable].md` | Final output | At completion |
## Core Workflow
```
Loop 1: Create task_plan.md with goal and phases
Loop 2: Research -> save to notes.md -> update task_plan.md
Loop 3: Read notes.md -> create deliverable -> update task_plan.md
Loop 4: Deliver final output
```
### The Loop in Detail
**Before each major action:**
```
Read task_plan.md # Refresh goals in attention window
```
**After each phase:**
```
Edit task_plan.md # Mark [x], update status
```
**When storing information:**
```
Write notes.md # Don't stuff context, store in file
```
## task_plan.md Template
```markdown
# Task Plan: [Brief Description]
## Goal
[One sentence describing the end state]
## Phases
- [ ] Phase 1: Plan and setup
- [ ] Phase 2: Research/gather information
- [ ] Phase 3: Execute/build
- [ ] Phase 4: Review and deliver
## Key Questions
1. [Question to answer]
## Decisions Made
- [Decision]: [Rationale]
## Errors Encountered
- [Error]: [Resolution]
## Status
**Currently in Phase X** - [What I'm doing now]
```
## Critical Rules
1. **ALWAYS Create Plan First** - Never start a complex task without `task_plan.md`
2. **Read Before Decide** - Before any major decision, read the plan file
3. **Update After Act** - After completing any phase, immediately update the plan
4. **Store, Don't Stuff** - Large outputs go to files, not context
5. **Log All Errors** - Every error goes in the "Errors Encountered" section
## When to Use
**Use for:** Multi-step tasks (3+ steps), research tasks, building/creating something, tasks spanning multiple tool calls
**Skip for:** Simple questions, single-file edits, quick lookups
$ARGUMENTS
@@ -1,198 +0,0 @@
---
description: React component patterns with TypeScript examples. Composition, compound components, custom hooks, Context+Reducer state, memoization, code splitting, virtualization, error boundaries, accessibility, and animations.
---
# Frontend Development Patterns
Modern frontend patterns for React, Next.js, and performant user interfaces.
## Component Patterns
### Composition Over Inheritance
```typescript
interface CardProps {
children: React.ReactNode
variant?: 'default' | 'outlined'
}
export function Card({ children, variant = 'default' }: CardProps) {
return <div className={`card card-${variant}`}>{children}</div>
}
export function CardHeader({ children }: { children: React.ReactNode }) {
return <div className="card-header">{children}</div>
}
export function CardBody({ children }: { children: React.ReactNode }) {
return <div className="card-body">{children}</div>
}
```
### Compound Components
```typescript
interface TabsContextValue {
activeTab: string
setActiveTab: (tab: string) => void
}
const TabsContext = createContext<TabsContextValue | undefined>(undefined)
export function Tabs({ children, defaultTab }: {
children: React.ReactNode
defaultTab: string
}) {
const [activeTab, setActiveTab] = useState(defaultTab)
return (
<TabsContext.Provider value={{ activeTab, setActiveTab }}>
{children}
</TabsContext.Provider>
)
}
export function Tab({ id, children }: { id: string, children: React.ReactNode }) {
const context = useContext(TabsContext)
if (!context) throw new Error('Tab must be used within Tabs')
return (
<button
className={context.activeTab === id ? 'active' : ''}
onClick={() => context.setActiveTab(id)}
>
{children}
</button>
)
}
```
## Custom Hooks Patterns
### Async Data Fetching Hook
```typescript
export function useQuery<T>(
key: string,
fetcher: () => Promise<T>,
options?: { onSuccess?: (data: T) => void; onError?: (error: Error) => void; enabled?: boolean }
) {
const [data, setData] = useState<T | null>(null)
const [error, setError] = useState<Error | null>(null)
const [loading, setLoading] = useState(false)
const refetch = useCallback(async () => {
setLoading(true)
setError(null)
try {
const result = await fetcher()
setData(result)
options?.onSuccess?.(result)
} catch (err) {
const error = err as Error
setError(error)
options?.onError?.(error)
} finally {
setLoading(false)
}
}, [fetcher, options])
useEffect(() => {
if (options?.enabled !== false) refetch()
}, [key, refetch, options?.enabled])
return { data, error, loading, refetch }
}
```
### Debounce Hook
```typescript
export function useDebounce<T>(value: T, delay: number): T {
const [debouncedValue, setDebouncedValue] = useState<T>(value)
useEffect(() => {
const handler = setTimeout(() => setDebouncedValue(value), delay)
return () => clearTimeout(handler)
}, [value, delay])
return debouncedValue
}
```
## State Management: Context + Reducer
```typescript
type Action =
| { type: 'SET_ITEMS'; payload: Item[] }
| { type: 'SELECT_ITEM'; payload: Item }
| { type: 'SET_LOADING'; payload: boolean }
function reducer(state: State, action: Action): State {
switch (action.type) {
case 'SET_ITEMS': return { ...state, items: action.payload }
case 'SELECT_ITEM': return { ...state, selectedItem: action.payload }
case 'SET_LOADING': return { ...state, loading: action.payload }
default: return state
}
}
```
## Performance Optimization
### Memoization
- `useMemo` for expensive computations
- `useCallback` for functions passed to children
- `React.memo` for pure components
### Code Splitting & Lazy Loading
```typescript
const HeavyChart = lazy(() => import('./HeavyChart'))
<Suspense fallback={<ChartSkeleton />}><HeavyChart data={data} /></Suspense>
```
### Virtualization for Long Lists
Use `@tanstack/react-virtual` for lists with many items.
## Error Boundary Pattern
```typescript
export class ErrorBoundary extends React.Component<
{ children: React.ReactNode },
{ hasError: boolean; error: Error | null }
> {
state = { hasError: false, error: null }
static getDerivedStateFromError(error: Error) {
return { hasError: true, error }
}
render() {
if (this.state.hasError) {
return <div><h2>Something went wrong</h2><p>{this.state.error?.message}</p></div>
}
return this.props.children
}
}
```
## Animation: Framer Motion
```typescript
<AnimatePresence>
{items.map(item => (
<motion.div
key={item.id}
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -20 }}
transition={{ duration: 0.3 }}
>
<ItemCard item={item} />
</motion.div>
))}
</AnimatePresence>
```
## Accessibility
- Semantic HTML first (button, nav, main, article)
- Keyboard navigation: ArrowDown/Up, Enter, Escape
- Focus management for modals (save/restore focus)
- ARIA attributes only when semantic HTML is insufficient
$ARGUMENTS
@@ -1,111 +0,0 @@
---
description: Remove unused code with verified safety and atomic commits
---
You are a dead code removal specialist. Execute the FULL dead code removal workflow.
## CRITICAL RULES
1. **Verify before removing.** Never guess. Always verify references before removing ANYTHING.
2. **One removal = one commit.** Every dead code removal gets its own atomic commit.
3. **Test after every removal.** Run tests after each. If it fails, REVERT and skip.
4. **Leaf-first order.** Remove deepest unused symbols first, then work up the dependency chain.
5. **Never remove entry points.** Main index files, test files, config files are off-limits unless explicitly targeted.
## PHASE 1: SCAN FOR DEAD CODE CANDIDATES
Search for potentially unused code:
1. **Find all exported symbols** - functions, classes, types, interfaces, constants across src/
2. **Find potentially unused files** - files not imported by any other file
3. **Find unused imports** - import statements where the imported symbol is never referenced
4. **Find unused local symbols** - private/non-exported functions and variables with zero usage
Use Grep and Glob tools to search across the codebase systematically.
## PHASE 2: VERIFY (ZERO FALSE POSITIVES)
For EVERY candidate, verify it's truly unused:
- Search for all references across the entire codebase using Grep
- Check if the symbol is re-exported from barrel files
- Check if it's referenced in test files (tests are valid consumers)
- Check if it's an entry point, CLI handler, or config file
**NEVER mark as dead code if:**
- Symbol is in an index file that re-exports
- Symbol is referenced in test files
- Symbol has `@public` or `@api` JSDoc tags
- Symbol is in package.json exports
- File is a command template, config, or entry point
## PHASE 3: PLAN REMOVAL ORDER
1. Build dependency graph of confirmed dead symbols
2. Order by leaf-first (deepest unused symbols first)
3. Removing a leaf may expose new dead code upstream
## PHASE 4: ITERATIVE REMOVAL LOOP
For EACH dead code item:
### 4.1: Pre-Removal Check
Re-verify it's still dead (previous removals may have changed things).
### 4.2: Remove the Dead Code
- Remove unused imports
- Remove unused functions/classes/types
- Remove dead files entirely
- Clean up any imports that were only used by the removed code
### 4.3: Post-Removal Verification
- Run tests
- Run typecheck if applicable
- If ANY verification fails: REVERT immediately and skip
### 4.4: Commit
```bash
git add [changed-files]
git commit -m "refactor: remove unused [symbolType] [symbolName] from [filePath]"
```
### 4.5: Re-scan After Removal
Check if removal exposed NEW dead code. Add to queue if found.
## PHASE 5: FINAL VERIFICATION
1. Run full test suite
2. Run typecheck
3. Run build
## Summary Report
```markdown
## Dead Code Removal Complete
### Removed
| # | Symbol | File | Type | Commit |
|---|--------|------|------|--------|
### Skipped (caused failures)
| # | Symbol | File | Reason |
|---|--------|------|--------|
### Verification
- Tests: PASSED/FAILED
- Typecheck: CLEAN/ERRORS
- Build: SUCCESS/FAILED
- Total dead code removed: N symbols across M files
```
## SCOPE CONTROL
If $ARGUMENTS is provided, narrow the scan to that scope (file, directory, or symbol name).
## ABORT CONDITIONS
**STOP and report if:**
- 3 consecutive removals cause test failures
- Build breaks and cannot be fixed by reverting
- More than 50 candidates found (ask user to narrow scope)
$ARGUMENTS
@@ -1,117 +0,0 @@
---
description: Comprehensive security scan and vulnerability assessment (OWASP, SAST, dependencies, secrets)
---
# Security Scan and Vulnerability Assessment
You are a security expert. Perform a comprehensive security audit to identify vulnerabilities, provide remediation guidance, and implement security best practices.
## Requirements
$ARGUMENTS
## Process
### 1. Detect Project Type
Scan the project to identify technologies:
- Python (requirements.txt, setup.py, pyproject.toml)
- JavaScript/Node.js (package.json)
- Go (go.mod)
- Rust (Cargo.toml)
- Docker (Dockerfile)
- Terraform (*.tf)
### 2. Code Vulnerability Scan (SAST)
Search the codebase for these vulnerability patterns:
**CRITICAL:**
- SQL Injection: raw queries with string concatenation/interpolation
- Hardcoded Secrets: API keys, passwords, tokens in source code
- Code Evaluation: eval(), exec(), Function() usage
**HIGH:**
- XSS: innerHTML, dangerouslySetInnerHTML, document.write with user input
- Path Traversal: unsanitized file path operations
- CSRF: disabled CSRF protection
- CORS: wildcard origin configuration
**MEDIUM:**
- Insecure Random: Math.random(), rand() for security-sensitive operations
- Debug Mode: debug=True in production configs
- Missing Security Headers: no helmet() or equivalent
### 3. Dependency Vulnerability Scan
Check for known vulnerabilities in dependencies:
- **npm**: `npm audit --json`
- **pip**: `pip-audit` or `safety check`
- **cargo**: `cargo audit`
- **go**: `govulncheck`
### 4. Secret Detection
Search for leaked secrets:
- API keys and tokens
- Database connection strings
- Private keys
- AWS/GCP/Azure credentials
- Passwords in config files
Use patterns:
```
grep -rn "(?i)(api[_-]?key|apikey|secret|password|token)\s*[:=]\s*[\"'][^\"']{8,}"
grep -rn "(?i)bearer\s+[a-zA-Z0-9\-\._~\+\/]{20,}"
grep -rn "(?i)(aws[_-]?access|aws[_-]?secret)\s*[:=]"
```
### 5. Framework-Specific Checks
**React/Next.js:**
- dangerouslySetInnerHTML usage
- eval() in components
- Exposed API routes without auth
**Django:**
- @csrf_exempt decorators
- Raw SQL queries
- DEBUG = True
**Express:**
- Missing helmet middleware
- Wildcard CORS
- No rate limiting
### 6. Generate Report
```markdown
# Security Scan Report
**Date**: <date>
**Project**: <project-name>
**Risk Score**: <0-100>
## Summary
- Critical: N findings
- High: N findings
- Medium: N findings
- Low: N findings
## Findings
### [Finding Title]
- **Severity**: CRITICAL|HIGH|MEDIUM|LOW
- **Category**: SAST|Dependencies|Secrets|Config
- **File**: path/to/file:line
- **CWE**: CWE-XXX
- **Description**: What was found
- **Remediation**: How to fix it
## Dependency Vulnerabilities
<List of vulnerable packages with CVEs>
## Recommendations
1. Immediate actions (Critical/High)
2. Short-term improvements (Medium)
3. Long-term hardening (Low)
```
@@ -1,62 +0,0 @@
---
description: Debug complex issues with root cause analysis and multiple fix approaches
---
Debug complex issues using a structured debugging approach:
## Debugging Approach
### 1. Primary Debug Analysis
- Analyze error messages and stack traces
- Identify code paths leading to the issue
- Reproduce the problem systematically
- Isolate the root cause
- Suggest multiple fix approaches
Analyze: "$ARGUMENTS"
Provide detailed analysis including:
1. Error reproduction steps
2. Root cause identification
3. Code flow analysis leading to the error
4. Multiple solution approaches with trade-offs
5. Recommended fix with implementation details
### 2. Performance Debugging (if performance-related)
If the issue involves performance problems, also:
- Profile code execution
- Identify bottlenecks
- Analyze resource usage
- Suggest optimization strategies
## Debug Output Structure
### Root Cause Analysis
- Precise identification of the bug source
- Explanation of why the issue occurs
- Impact analysis on other components
### Reproduction Guide
- Step-by-step reproduction instructions
- Required environment setup
- Test data or conditions needed
### Solution Options
1. **Quick Fix** - Minimal change to resolve issue
- Implementation details
- Risk assessment
2. **Proper Fix** - Best long-term solution
- Refactoring requirements
- Testing needs
3. **Preventive Measures** - Avoid similar issues
- Code patterns to adopt
- Tests to add
### Implementation Guide
- Specific code changes needed
- Order of operations for the fix
- Validation steps
Issue to debug: $ARGUMENTS
@@ -1,89 +0,0 @@
---
description: Execute a full TDD red-green-refactor cycle
---
Execute a comprehensive Test-Driven Development (TDD) workflow with strict red-green-refactor discipline:
## Configuration
### Coverage Thresholds
- Minimum line coverage: 80%
- Minimum branch coverage: 75%
- Critical path coverage: 100%
### Refactoring Triggers
- Cyclomatic complexity > 10
- Method length > 20 lines
- Class length > 200 lines
- Duplicate code blocks > 3 lines
## Phase 1: Test Specification and Design
### 1. Requirements Analysis
Analyze requirements for: $ARGUMENTS. Define acceptance criteria, identify edge cases, and create test scenarios.
### 2. Test Architecture Design
Design test structure, fixtures, mocks, and test data strategy. Ensure testability and maintainability.
## Phase 2: RED - Write Failing Tests
### 3. Write Unit Tests (Failing)
Write FAILING unit tests. Tests must fail initially. Include edge cases, error scenarios, and happy paths. DO NOT implement production code yet.
### 4. Verify Test Failure
Verify all tests are failing correctly. Ensure failures are for the right reasons (missing implementation, not test errors).
**GATE**: Do not proceed until all tests fail appropriately.
## Phase 3: GREEN - Make Tests Pass
### 5. Minimal Implementation
Implement MINIMAL code to make tests pass. Focus only on making tests green. Do not add extra features or optimizations.
### 6. Verify Test Success
Run all tests and verify they pass. Check coverage metrics. Ensure no tests were accidentally broken.
**GATE**: All tests must pass before proceeding.
## Phase 4: REFACTOR - Improve Code Quality
### 7. Code Refactoring
Refactor implementation while keeping tests green. Apply SOLID principles, remove duplication, improve naming. Run tests after each refactoring.
### 8. Test Refactoring
Refactor tests: remove duplication, improve names, extract common fixtures. Ensure coverage unchanged or improved.
## Phase 5: Integration Tests
### 9. Write Integration Tests (Failing First)
Write FAILING integration tests. Test component interactions, API contracts, and data flow.
### 10. Implement Integration
Make integration tests pass. Focus on component interaction and data flow.
## Validation Checkpoints
### RED Phase
- [ ] All tests written before implementation
- [ ] All tests fail with meaningful error messages
- [ ] No test passes accidentally
### GREEN Phase
- [ ] All tests pass
- [ ] No extra code beyond test requirements
- [ ] Coverage meets minimum thresholds
### REFACTOR Phase
- [ ] All tests still pass after refactoring
- [ ] Code complexity reduced
- [ ] Duplication eliminated
## Anti-Patterns to Avoid
- Writing implementation before tests
- Writing tests that already pass
- Skipping the refactor phase
- Modifying tests to make them pass
- Writing tests after implementation
TDD implementation for: $ARGUMENTS
@@ -1,99 +0,0 @@
---
description: React and Next.js performance optimization guidelines from Vercel Engineering. 45 rules across 8 categories, prioritized by impact.
---
# Vercel React Best Practices
Comprehensive performance optimization guide for React and Next.js applications. 45 rules across 8 categories, prioritized by impact.
## When to Apply
- Writing new React components or Next.js pages
- Implementing data fetching (client or server-side)
- Reviewing code for performance issues
- Refactoring existing React/Next.js code
- Optimizing bundle size or load times
## Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | Eliminating Waterfalls | CRITICAL | `async-` |
| 2 | Bundle Size Optimization | CRITICAL | `bundle-` |
| 3 | Server-Side Performance | HIGH | `server-` |
| 4 | Client-Side Data Fetching | MEDIUM-HIGH | `client-` |
| 5 | Re-render Optimization | MEDIUM | `rerender-` |
| 6 | Rendering Performance | MEDIUM | `rendering-` |
| 7 | JavaScript Performance | LOW-MEDIUM | `js-` |
| 8 | Advanced Patterns | LOW | `advanced-` |
## 1. Eliminating Waterfalls (CRITICAL)
- **async-defer-await** - Move await into branches where actually used
- **async-parallel** - Use Promise.all() for independent operations
- **async-dependencies** - Use better-all for partial dependencies
- **async-api-routes** - Start promises early, await late in API routes
- **async-suspense-boundaries** - Use Suspense to stream content
## 2. Bundle Size Optimization (CRITICAL)
- **bundle-barrel-imports** - Import directly, avoid barrel files
- **bundle-dynamic-imports** - Use next/dynamic for heavy components
- **bundle-defer-third-party** - Load analytics/logging after hydration
- **bundle-conditional** - Load modules only when feature is activated
- **bundle-preload** - Preload on hover/focus for perceived speed
## 3. Server-Side Performance (HIGH)
- **server-cache-react** - Use React.cache() for per-request deduplication
- **server-cache-lru** - Use LRU cache for cross-request caching
- **server-serialization** - Minimize data passed to client components
- **server-parallel-fetching** - Restructure components to parallelize fetches
- **server-after-nonblocking** - Use after() for non-blocking operations
## 4. Client-Side Data Fetching (MEDIUM-HIGH)
- **client-swr-dedup** - Use SWR for automatic request deduplication
- **client-event-listeners** - Deduplicate global event listeners
## 5. Re-render Optimization (MEDIUM)
- **rerender-defer-reads** - Don't subscribe to state only used in callbacks
- **rerender-memo** - Extract expensive work into memoized components
- **rerender-dependencies** - Use primitive dependencies in effects
- **rerender-derived-state** - Subscribe to derived booleans, not raw values
- **rerender-functional-setstate** - Use functional setState for stable callbacks
- **rerender-lazy-state-init** - Pass function to useState for expensive values
- **rerender-transitions** - Use startTransition for non-urgent updates
## 6. Rendering Performance (MEDIUM)
- **rendering-animate-svg-wrapper** - Animate div wrapper, not SVG element
- **rendering-content-visibility** - Use content-visibility for long lists
- **rendering-hoist-jsx** - Extract static JSX outside components
- **rendering-svg-precision** - Reduce SVG coordinate precision
- **rendering-hydration-no-flicker** - Use inline script for client-only data
- **rendering-activity** - Use Activity component for show/hide
- **rendering-conditional-render** - Use ternary, not && for conditionals
## 7. JavaScript Performance (LOW-MEDIUM)
- **js-batch-dom-css** - Group CSS changes via classes or cssText
- **js-index-maps** - Build Map for repeated lookups
- **js-cache-property-access** - Cache object properties in loops
- **js-cache-function-results** - Cache function results in module-level Map
- **js-cache-storage** - Cache localStorage/sessionStorage reads
- **js-combine-iterations** - Combine multiple filter/map into one loop
- **js-length-check-first** - Check array length before expensive comparison
- **js-early-exit** - Return early from functions
- **js-hoist-regexp** - Hoist RegExp creation outside loops
- **js-min-max-loop** - Use loop for min/max instead of sort
- **js-set-map-lookups** - Use Set/Map for O(1) lookups
- **js-tosorted-immutable** - Use toSorted() for immutability
## 8. Advanced Patterns (LOW)
- **advanced-event-handler-refs** - Store event handlers in refs
- **advanced-use-latest** - useLatest for stable callback refs
$ARGUMENTS
@@ -1,88 +0,0 @@
---
name: work
description: "Pick a Linear task (or create one), implement in a worktree, open a PR, and iterate on reviews autonomously"
user-invocable: true
args:
- name: input
description: "A Linear issue ID (e.g. ERN-347), an ad-hoc task description, or omit to auto-pick next unblocked task"
required: false
---
# Work - Proper PR Flow
Autonomous workflow: Linear issue -> worktree -> implementation -> PR -> review iteration -> done.
**First:** Read `~/.claude/skills/linear-common/COMMON.md` for shared setup instructions.
## Workflow
### 1. Setup (from COMMON.md)
- Load project config
- Select task (from `$ARGUMENTS`)
- Set up worktree
- Gather context
### 2. Plan
1. Analyze the issue requirements and the codebase context you gathered.
2. Break the work into logical commits.
3. If the issue is non-trivial, write a brief plan as a comment on the Linear issue.
4. Identify risks or open questions. If they're blocking, ask the user. If not, note them and proceed with best judgment.
### 3. Implement
Follow the implementation guidelines from COMMON.md.
After implementation is complete:
1. Run the `buildCommand` from the config. All checks must pass before opening a PR.
2. If tests fail, fix them. Do not ship broken code.
### 4. Open PR
1. Push the branch: `git push -u origin <branch>`
2. Open a PR with `gh pr create`:
- Title: concise, under 70 characters
- Body format:
```
## Summary
<bullets>
## Linear
Closes <ISSUE-ID>
## Test plan
<what was tested and how>
```
- Request reviewers from `prReviewers` if configured.
3. Move the Linear issue to "In Review" (or equivalent status).
### 5. Review loop
Repeat until the PR is approved and CI passes:
1. Poll for reviews:
```
gh pr view <number> --json reviews,reviewRequests,statusCheckRollup
gh api repos/{owner}/{repo}/pulls/{number}/comments
```
2. For each review comment:
- **Valid feedback**: fix the code, commit, push.
- **Misunderstanding**: reply explaining, resolve the thread.
- Resolve addressed threads via GraphQL:
```
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "<ID>"}) { thread { isResolved } } }'
```
- Find thread IDs:
```
gh api graphql -f query='{ repository(owner: "<OWNER>", name: "<REPO>") { pullRequest(number: <N>) { reviewThreads(first: 100) { nodes { id isResolved comments(first: 1) { nodes { body } } } } } } }'
```
3. After addressing all comments, verify the build still passes.
4. Continue until:
- All review threads resolved
- CI checks pass
- No pending review requests
5. Move the Linear issue to "Done" (or "Ready to merge" if that status exists).
@@ -1,70 +0,0 @@
---
description: Compare worktree changes with target branch before merging
---
# Compare Worktree Changes
Visualize changes in the current worktree compared to a target branch (usually main/master).
**Usage:** `/worktree-compare [target-branch]`
## Process
### 1. Verify Context
```bash
CURRENT_BRANCH=$(git branch --show-current)
WORKTREE_DIR=$(git rev-parse --git-common-dir)
# Check we're in a worktree
if [[ ! "$WORKTREE_DIR" == *".git/worktrees"* ]]; then
echo "Error: You're not in a worktree"
exit 1
fi
```
### 2. Determine Target Branch
```bash
TARGET_BRANCH="${1:-}"
if [ -z "$TARGET_BRANCH" ]; then
if git show-ref --verify --quiet refs/heads/main; then
TARGET_BRANCH="main"
elif git show-ref --verify --quiet refs/heads/master; then
TARGET_BRANCH="master"
fi
fi
```
### 3. Update Target Branch
```bash
git fetch origin "$TARGET_BRANCH:$TARGET_BRANCH" 2>/dev/null || true
```
### 4. Summary + Diff
```bash
git diff --shortstat "$TARGET_BRANCH..$CURRENT_BRANCH"
git diff --name-status "$TARGET_BRANCH..$CURRENT_BRANCH"
git log "$TARGET_BRANCH..$CURRENT_BRANCH" --oneline --decorate --graph
git diff "$TARGET_BRANCH..$CURRENT_BRANCH"
```
### 5. Conflict Detection
```bash
# Check for files modified in both branches
COMMON_FILES=$(comm -12 \
<(git diff --name-only "$TARGET_BRANCH..$CURRENT_BRANCH" | sort) \
<(git diff --name-only "$CURRENT_BRANCH..$TARGET_BRANCH" | sort))
if [ -z "$COMMON_FILES" ]; then
echo "No potential conflicts detected"
else
echo "Potential conflicts in:"
echo "$COMMON_FILES"
fi
```
$ARGUMENTS
@@ -1,54 +0,0 @@
---
description: List, manage, and clean up git worktrees
---
# List and Manage Worktrees
**Usage:**
- `/worktree-list` - List all worktrees
- `/worktree-list cleanup` - Remove merged worktrees
- `/worktree-list prune` - Clean stale references
## List All Worktrees
```bash
git worktree list
```
## Cleanup Merged Worktrees
If argument is "cleanup":
```bash
# Find main branch
if git show-ref --verify --quiet refs/heads/main; then
MAIN_BRANCH="main"
elif git show-ref --verify --quiet refs/heads/master; then
MAIN_BRANCH="master"
fi
# Find and remove merged branches and their worktrees
MERGED_BRANCHES=$(git branch --merged "$MAIN_BRANCH" | grep -v '^\*' | grep -v "$MAIN_BRANCH")
for branch in $MERGED_BRANCHES; do
WORKTREE_PATH=$(git worktree list | grep "\[$branch\]" | awk '{print $1}')
if [ -n "$WORKTREE_PATH" ]; then
git worktree remove "$WORKTREE_PATH" --force
fi
git branch -d "$branch"
done
git worktree prune
git worktree list
```
## Prune Stale References
If argument is "prune":
```bash
git worktree prune -v
git worktree list
```
$ARGUMENTS
@@ -1,45 +0,0 @@
---
name: yolo
description: "Pick a Linear task (or create one), implement in a worktree, push directly with minimal ceremony"
user-invocable: true
args:
- name: input
description: "A Linear issue ID (e.g. ERN-347), an ad-hoc task description, or omit to auto-pick next unblocked task"
required: false
---
# Yolo - Quick Ship Flow
Fast autonomous workflow: Linear issue -> worktree -> implementation -> push -> done. No PRs, no reviews.
**First:** Read `~/.claude/skills/linear-common/COMMON.md` for shared setup instructions.
## Workflow
### 1. Setup (from COMMON.md)
- Load project config
- Select task (from `$ARGUMENTS`)
- Set up worktree
- Gather context
### 2. Implement
Follow the implementation guidelines from COMMON.md. Move fast — this is yolo mode.
- Skip formal planning. Read the issue, understand it, start coding.
- Still write tests if the project has them, but don't block on edge cases.
- Run the `buildCommand` if configured. If it fails, fix it. If a failure is minor and unrelated to your change, warn the user but keep going.
### 3. Ship
1. Push the branch: `git push -u origin <branch>`
2. If the work is complete and self-contained, merge to the default branch:
```
git checkout <defaultBranch>
git merge <branch> --no-edit
git push
git checkout <branch>
```
Only do this if the change is clearly ready. If unsure, just push the branch and let the user decide.
3. Move the Linear issue to "Done".
4. That's it. No PR, no review loop.
+4
View File
@@ -9,6 +9,10 @@ in
{
imports = [ inputs.codex-desktop-linux.homeManagerModules.default ];
# cliPackage only tells the desktop app where to find codex; it does not put
# it on PATH, so the cli needs installing separately.
home.packages = [ codex-cli ];
programs.codexDesktopLinux = {
enable = true;
cliPackage = codex-cli;
+1 -2
View File
@@ -2,7 +2,6 @@
lib,
pkgs,
config,
inputs,
...
}:
{
@@ -11,6 +10,7 @@
./zsh.nix
./nix.nix
./neovim
./editors.nix
./rust.nix
./elixir.nix
./nodejs.nix
@@ -34,7 +34,6 @@
packages = with pkgs; [
impala
inputs.yogurt.packages.${pkgs.system}.default
];
username = lib.mkDefault "naps62";
+3
View File
@@ -46,6 +46,7 @@
slack
ferdium
signal-desktop
zoom-us
# dev tools
yaak
@@ -56,6 +57,8 @@
];
pointerCursor = {
# setting the block alone no longer implies generation; must be explicit
enable = true;
package = pkgs.numix-cursor-theme;
name = "Numix-Cursor-Light";
};
+14
View File
@@ -57,5 +57,19 @@
lazydocker # docker TUI
dust # du replacement
duf # df replacement
rtk # cli proxy the claude hooks rewrite commands through
wget
sqlite
shellcheck
cmake
ninja
git-filter-repo
expect
whois
p7zip
poppler-utils # pdftotext
jpegoptim
sshpass
];
}
+12
View File
@@ -0,0 +1,12 @@
{ pkgs, ... }:
{
# Trialling GUI editors alongside neovim, for reviewing agent-generated
# diffs. Drop the ones that don't stick.
home.packages = with pkgs; [
zed-editor
code-cursor
# VSCodium and Cursor both default to Open VSX, which carries
# GitHub.vscode-pull-request-github. Zed has no PR review at all.
vscodium
];
}
+2 -1
View File
@@ -1,6 +1,7 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
elixir_1_18
# top-level elixir_* aliases are deprecated in favour of the beamPackages sets
beamPackages.elixir_1_18
];
}
+239 -221
View File
@@ -2,11 +2,49 @@
config,
lib,
pkgs,
inputs,
...
}:
let
cfg = config.custom.hyprland;
hyprPkgs = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system};
# xdph runs this instead of hyprland-share-picker (screencopy:custom_picker_binary).
# The contract is just "print [SELECTION] to stdout"; a leading "r" grants a
# restore token. Printing it immediately means the dialog never renders.
#
# Why bypass the picker at all: Slack opens a burst of screencast sessions per
# share and only asks for persist_mode=1, so the leading sessions race ahead of
# their restore token and re-prompt. allow_token_by_default alone still left
# ~3 dialogs per share.
#
# Escape hatch: `touch ~/.config/hypr/share-picker-manual` to get the real
# picker back when you need a window or region instead of a whole screen.
#
# Deliberately NOT the focused monitor: at the moment you hit "share screen"
# the focus is on the Slack/Chrome window, which is generally not the screen
# you actually want to show. Auto-picking it would silently share the wrong
# display. shareOutput is pinned per-host instead.
sharePicker = pkgs.writeShellScriptBin "xdph-auto-picker" ''
realPicker="${hyprPkgs.xdg-desktop-portal-hyprland}/bin/hyprland-share-picker"
if [ -e "$HOME/.config/hypr/share-picker-manual" ]; then
exec "$realPicker" "$@"
fi
want=${lib.escapeShellArg (toString cfg.shareOutput)}
# Only auto-select if that output is actually connected right now; otherwise
# fall back to the picker rather than sharing something unexpected.
if ${hyprPkgs.hyprland}/bin/hyprctl monitors -j 2>/dev/null \
| ${pkgs.jq}/bin/jq -e --arg o "$want" 'any(.[]; .name == $o)' >/dev/null 2>&1; then
printf '[SELECTION]r/screen:%s\n' "$want"
else
exec "$realPicker" "$@"
fi
'';
# Floating webcam preview for the "corner-cam" recording trick: run `webcam`,
# then capture the whole screen with kooha/wf-recorder — the preview is in the
# recording. v4l2 only (won't work with the laptop's IPU6 cam). Optional device
@@ -32,10 +70,21 @@ in
default = 24;
description = "Cursor size for XCURSOR_SIZE and HYPRCURSOR_SIZE";
};
shareOutput = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
example = "HDMI-A-1";
description = ''
Output that screen-sharing auto-selects, bypassing the xdph picker
entirely. null keeps the normal picker. Falls back to the picker if
the named output isn't currently connected.
'';
};
};
imports = [
./cursor.nix
./kbptr.nix
./noctalia
./wallpapers.nix
];
@@ -62,264 +111,233 @@ in
WEBKIT_DISABLE_DMABUF_RENDERER = "1";
};
# xdph's share-picker is stateless: the "Allow a restore token" checkbox
# starts unticked, so no app ever receives a token and every single share
# re-prompts (journal showed 0 "Sent restore token" in 30 days, always
# re-selecting the same output). This pre-ticks it, so OBS/Chrome/Slack get
# a token on first share and skip the dialog thereafter.
# Note: xdph.conf is still hyprlang — the 0.55 Lua switch only hit the
# compositor config, not this separate binary.
xdg.configFile."hypr/xdph.conf".text = ''
screencopy {
allow_token_by_default = true
${lib.optionalString (
cfg.shareOutput != null
) " custom_picker_binary = ${sharePicker}/bin/xdph-auto-picker"}
}
'';
wayland.windowManager.hyprland = {
enable = true;
package = null;
portalPackage = null;
# Keep the hyprlang config format (the new default is "lua"); our
# settings are written as hyprlang.
configType = "hyprlang";
# Hyprland 0.55+ removed the hyprlang parser entirely — the config format
# is now Lua only (see home/common/programs/hyprland — the whole config
# below is raw Lua using the hl.* API). home-manager still emits its own
# systemd-session start hook, so we don't duplicate that here.
configType = "lua";
plugins = [ ];
settings = {
plugin = {
overview = {
autoDrag = true;
exitOnClick = true;
exitOnSwitch = true;
showNewWorkspace = false;
showEmptyWorkspace = false;
};
};
input = {
kb_options = "ctrl:nocaps";
repeat_delay = 150;
extraConfig = ''
local mod = "SUPER"
touchpad = {
natural_scroll = "yes";
};
numlock_by_default = true;
};
-- look & feel / behaviour
hl.config({
general = {
border_size = 1,
gaps_in = 0,
gaps_out = 0,
snap = {
enabled = true,
border_overlap = true,
},
col = {
inactive_border = "0x99999999",
active_border = "0x99999999",
},
},
cursor = {
no_hardware_cursors = "yes";
# Auto-hide the pointer after 3s of no movement so a parked cursor
# doesn't sit on top of a game (visible in the stream too). It
# reappears the instant the mouse moves.
inactive_timeout = 3;
};
input = {
kb_options = "ctrl:nocaps",
repeat_delay = 150,
touchpad = {
natural_scroll = true,
},
numlock_by_default = true,
},
general = {
border_size = 1;
gaps_in = 0;
gaps_out = 0;
snap = {
enabled = true;
border_overlap = true;
};
cursor = {
no_hardware_cursors = true,
-- Auto-hide the pointer after 3s of no movement so a parked cursor
-- doesn't sit on top of a game (visible in the stream too). It
-- reappears the instant the mouse moves.
inactive_timeout = 3,
},
"col.inactive_border" = "0x99999999";
"col.active_border" = "0x99999999";
};
misc = {
disable_hyprland_logo = true,
disable_splash_rendering = true,
on_focus_under_fullscreen = 2,
},
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
on_focus_under_fullscreen = 2;
};
ecosystem = {
no_update_news = true,
},
ecosystem = {
no_update_news = true;
};
xwayland = {
force_zero_scaling = true,
},
xwayland = {
force_zero_scaling = true;
};
decoration = {
blur = {
enabled = true,
popups = false,
},
shadow = {
enabled = false,
},
},
})
decoration = {
blur = {
enabled = true;
popups = false;
};
shadow = {
enabled = false;
};
};
-- keep default animations, but speed them all up
hl.animation({ leaf = "global", enabled = true, speed = 2, bezier = "default" })
# keep default animations, but speed them all up
animations = {
animation = [
"global, 1, 2, default"
];
};
-- environment
hl.env("GDK_SCALE", "2.0")
hl.env("XCURSOR_SIZE", "${toString cfg.cursorSize}")
hl.env("HYPRCURSOR_THEME", "rose-pine-hyprcursor")
hl.env("HYPRCURSOR_SIZE", "${toString cfg.cursorSize}")
-- Route Qt6 apps (incl. the xdph screen-share picker) through qt6ct so
-- the noctalia-generated color scheme actually applies. Without this
-- var the qt6ct.conf is never read.
hl.env("QT_QPA_PLATFORMTHEME", "qt6ct")
env = [
"GDK_SCALE, 2.0"
"XCURSOR_SIZE, ${toString cfg.cursorSize}"
"HYPRCURSOR_THEME, rose-pine-hyprcursor"
"HYPRCURSOR_SIZE, ${toString cfg.cursorSize}"
# Route Qt6 apps (incl. the xdph screen-share picker) through qt6ct so
# the noctalia-generated color scheme actually applies. Without this
# var the qt6ct.conf is never read.
"QT_QPA_PLATFORMTHEME, qt6ct"
];
-- autostart
hl.on("hyprland.start", function()
-- Import the Qt theme var too, so the dbus/systemd-activated
-- xdg-desktop-portal-hyprland (and its share-picker) inherit it.
hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME")
hl.exec_cmd("hyprctl setcursor Nordzy-cursors ${toString cfg.cursorSize}")
hl.exec_cmd("hyprsunset")
hl.exec_cmd("noctalia")
end)
"exec-once" = [
# Import the Qt theme var too, so the dbus/systemd-activated
# xdg-desktop-portal-hyprland (and its share-picker) inherit it.
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME"
"hyprctl setcursor Nordzy-cursors ${toString cfg.cursorSize}"
"hyprsunset"
"noctalia"
"yogurt --tray"
];
-- layer rules
hl.layer_rule({ match = { namespace = "noctalia-wallpaper" }, blur = true, ignore_alpha = 0.5 })
layerrule = [
"blur 1, match:namespace noctalia-wallpaper"
"ignore_alpha 0.5, match:namespace noctalia-wallpaper"
];
workspace = [
# no gaps when only window
"w[t1], gapsout:0, gapsin:0"
"w[tg1], gapsout:0, gapsin:0"
"f[1], gapsout:0, gapsin:0"
-- workspace rules
hl.workspace_rule({ workspace = "w[t1]", gaps_out = 0, gaps_in = 0 }) -- no gaps when only window
hl.workspace_rule({ workspace = "w[tg1]", gaps_out = 0, gaps_in = 0 })
hl.workspace_rule({ workspace = "f[1]", gaps_out = 0, gaps_in = 0 })
hl.workspace_rule({ workspace = "special:terminal", on_created_empty = "[float; size 1400 1000; center 1] kitty", persistent = false })
hl.workspace_rule({ workspace = "special:yazi", on_created_empty = "[float; size ${cfg.yaziSize}; center 1] kitty --session sessions/yazi", persistent = false })
"special:terminal, on-created-empty:[float; size 1400 1000; center 1] kitty, persistent:false"
"special:yazi, on-created-empty:[float; size ${cfg.yaziSize}; center 1] kitty --session sessions/yazi, persistent:false"
];
-- window rules
hl.window_rule({ match = { class = "com.gabm.satty" }, float = true })
windowrule = [
# satty
"float on, match:class com.gabm.satty"
hl.window_rule({ match = { class = "imv" }, float = true, size = "1920 1080", move = "(cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5))" })
hl.window_rule({ match = { class = "mpv" }, float = true, size = "1920 1080", move = "(cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5))" })
# imv
"float on, match:class imv"
"size 1920 1080, match:class imv"
"move (cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5)), match:class imv"
-- webcam overlay (`webcam` command) small, pinned, bottom-right.
-- Declared after the mpv class rule so its title match wins.
hl.window_rule({
match = { title = "webcam-overlay" },
float = true,
size = "360 240",
move = "100%-380 100%-260",
pin = true,
no_initial_focus = true,
border_size = 0,
})
# mpv
"float on, match:class mpv"
"size 1920 1080, match:class mpv"
"move (cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5)), match:class mpv"
hl.window_rule({ match = { class = "thunar" }, float = true, size = "1800 1200", move = "(cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5))" })
hl.window_rule({ match = { class = [[\.blueman-manager-wrapped]] }, float = true, size = "1200 800", move = "(cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5))" })
hl.window_rule({ match = { class = [[org\.pulseaudio\.pavucontrol]] }, float = true, size = "1200 1200", move = "(cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5))" })
# webcam overlay (`webcam` command) — small, pinned, bottom-right.
# Title rules come after the mpv class rules so they win.
"float on, match:title webcam-overlay"
"size 360 240, match:title webcam-overlay"
"move 100%-380 100%-260, match:title webcam-overlay"
"pin on, match:title webcam-overlay"
"no_initial_focus on, match:title webcam-overlay"
"border_size 0, match:title webcam-overlay"
-- wine / game installers (Inno Setup temp windows, e.g. Heroic/GOG).
-- Their class is the random "setup_*.tmp" filename, so match by suffix.
hl.window_rule({ match = { class = [[.*\.tmp]] }, float = true, center = true })
# thunar
"float on, match:class thunar"
"size 1800 1200, match:class thunar"
"move (cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5)), match:class thunar"
-- metamask
hl.window_rule({ match = { class = [[chrome-nkbihfbeogaeaoehlefnkodbefgpgknn-.*]] }, float = true })
-- bitwarden, chrome
hl.window_rule({ match = { class = [[chrome-nngceckbapebfimnlniiiahkandclblb-.*]] }, float = true })
-- claude for chrome
hl.window_rule({ match = { class = [[chrome-fcoeoabgfenejglbffodgkkbkcdhcgfn-.*]] }, float = true, move = "(cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5))" })
# bluetooth
"float on, match:class \\.blueman-manager-wrapped"
"size 1200 800, match:class \\.blueman-manager-wrapped"
"move (cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5)), match:class \\.blueman-manager-wrapped"
-- no gaps when only window
hl.window_rule({ match = { float = false, workspace = "w[t1]" }, border_size = 0, rounding = 0 })
hl.window_rule({ match = { float = false, workspace = "w[tg1]" }, border_size = 0, rounding = 0 })
hl.window_rule({ match = { float = false, workspace = "f[1]" }, border_size = 0, rounding = 0 })
# pavucontrol
"float on, match:class org\\.pulseaudio\\.pavucontrol"
"size 1200 1200, match:class org\\.pulseaudio\\.pavucontrol"
"move (cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5)), match:class org\\.pulseaudio\\.pavucontrol"
hl.window_rule({ match = { workspace = "special:terminal" }, center = true })
hl.window_rule({ match = { workspace = "special:yazi" }, center = true })
# wine / game installers (Inno Setup temp windows, e.g. Heroic/GOG).
# Their class is the random "setup_*.tmp" filename, so match by suffix.
"float on, match:class .*\\.tmp"
"center 1, match:class .*\\.tmp"
-- keybinds
hl.bind(mod .. " + N", hl.dsp.exec_cmd("noctalia msg panel-toggle control-center"))
hl.bind(mod .. " + T", hl.dsp.exec_cmd("kitty"))
hl.bind(mod .. " + V", hl.dsp.window.float({ action = "toggle" }))
hl.bind(mod .. " + Q", hl.dsp.window.close())
hl.bind(mod .. " + F", hl.dsp.window.fullscreen({ mode = "fullscreen" }))
hl.bind(mod .. " + SHIFT + F", hl.dsp.window.fullscreen({ mode = "maximized" }))
# metamask
"float on, match:class chrome-nkbihfbeogaeaoehlefnkodbefgpgknn-.*"
-- lock (routes through logind -> hypridle lock_cmd -> hyprlock)
hl.bind(mod .. " + CTRL + L", hl.dsp.exec_cmd("loginctl lock-session"))
# bitwarden, chrome
"float on, match:class chrome-nngceckbapebfimnlniiiahkandclblb-.*"
hl.bind(mod .. " + space", hl.dsp.exec_cmd("noctalia msg panel-toggle launcher"))
# claude for chrome
"float on, match:class chrome-fcoeoabgfenejglbffodgkkbkcdhcgfn-.*"
"move (cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5)), match:class chrome-fcoeoabgfenejglbffodgkkbkcdhcgfn-.*"
-- printscreen
hl.bind("Print", hl.dsp.exec_cmd("hyprshot -m region --raw | satty --filename - --output-filename ~/downloads/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png"))
hl.bind("SHIFT + Print", hl.dsp.exec_cmd("hyprshot -m window --raw | satty --filename - --output-filename ~/downloads/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png"))
# no gaps when only window
"border_size 0, match:float 0, match:workspace w[t1]"
"rounding 0, match:float 0, match:workspace w[t1]"
"border_size 0, match:float 0, match:workspace w[tg1]"
"rounding 0, match:float 0, match:workspace w[tg1]"
"border_size 0, match:float 0, match:workspace f[1]"
"rounding 0, match:float 0, match:workspace f[1]"
-- move focus with mod + hjkl
hl.bind(mod .. " + H", hl.dsp.focus({ direction = "left" }))
hl.bind(mod .. " + J", hl.dsp.focus({ direction = "down" }))
hl.bind(mod .. " + K", hl.dsp.focus({ direction = "up" }))
hl.bind(mod .. " + L", hl.dsp.focus({ direction = "right" }))
"center 1, match:workspace special:terminal"
"center 1, match:workspace special:yazi"
];
-- switch / move-to workspaces 1-6
for i = 1, 6 do
hl.bind(mod .. " + " .. i, hl.dsp.focus({ workspace = i }))
hl.bind(mod .. " + SHIFT + " .. i, hl.dsp.window.move({ workspace = i }))
end
"$mod" = "SUPER";
-- move active window inside workspace
hl.bind(mod .. " + SHIFT + H", hl.dsp.window.move({ direction = "left" }))
hl.bind(mod .. " + SHIFT + J", hl.dsp.window.move({ direction = "down" }))
hl.bind(mod .. " + SHIFT + K", hl.dsp.window.move({ direction = "up" }))
hl.bind(mod .. " + SHIFT + L", hl.dsp.window.move({ direction = "right" }))
bind = [
"$mod, n, exec, noctalia msg panel-toggle control-center"
"$mod, t, exec, kitty"
"$mod, v, togglefloating"
"$mod, q, killactive"
"$mod, f, fullscreen, 0"
"$mod SHIFT, f, fullscreen, 1"
-- scroll through workspaces with mod + scroll
hl.bind(mod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
hl.bind(mod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
# lock (routes through logind -> hypridle lock_cmd -> hyprlock)
"$mod CTRL, l, exec, loginctl lock-session"
-- special workspaces (toggle + recenter in one handler)
hl.bind(mod .. " + X", function()
hl.dispatch(hl.dsp.workspace.toggle_special("terminal"))
hl.dispatch(hl.dsp.window.center())
end)
hl.bind(mod .. " + E", function()
hl.dispatch(hl.dsp.workspace.toggle_special("yazi"))
hl.dispatch(hl.dsp.window.center())
end)
"$mod, space, exec, noctalia msg panel-toggle launcher"
-- volume / brightness (locked so they work on the lock screen; repeat on hold)
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true })
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true })
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl set 5%+"), { locked = true, repeating = true })
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl set 5%-"), { locked = true, repeating = true })
# printscreen
", Print, exec, hyprshot -m region --raw | satty --filename - --output-filename ~/downloads/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png"
"SHIFT, Print, exec, hyprshot -m window --raw | satty --filename - --output-filename ~/downloads/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png"
-- media keys (locked)
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("pactl set-sink-mute @DEFAULT_SINK@ toggle"), { locked = true })
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("volumectl -m toggle-mute"), { locked = true })
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
# move focus with mod + arrows
"$mod, h, movefocus, l"
"$mod, j, movefocus, d"
"$mod, k, movefocus, u"
"$mod, l, movefocus, r"
# Switch workspaces with mod + [0-9]
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
# Move active window to a workspace with mod + SHIFT + [0-9]
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
# Move active window inside workspace
"$mod SHIFT, h, movewindow, l"
"$mod SHIFT, j, movewindow, d"
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, l, movewindow, r"
# Scroll through existing workspaces with mod + scroll
"$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, workspace, e-1"
# special workspaces
"$mod, x, togglespecialworkspace, terminal"
"$mod, x, centerwindow"
"$mod, e, togglespecialworkspace, yazi"
"$mod, e, centerwindow"
];
bindel = [
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86MonBrightnessUp, exec, brightnessctl set 5%+"
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
];
bindl = [
", XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle"
", XF86AudioMicMute, exec, volumectl -m toggle-mute"
", XF86AudioNext, exec, playerctl next"
", XF86AudioPrev, exec, playerctl previous"
", XF86AudioPlay, exec, playerctl play-pause"
];
bindm = [
# Move/resize windows with mod + LMB/RMB and dragging
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
-- move/resize windows with mod + LMB/RMB drag
hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
'';
};
services.hyprpaper.enable = false;
+115
View File
@@ -0,0 +1,115 @@
{ pkgs, ... }:
let
# wl-kbptr's OpenCV target detection (the `detect` source used by SUPER+G) is
# hardcoded for a ~1080p screen and finds almost nothing on a 4K one.
#
# src/target_detection.cpp:264 discards any candidate target with
# `height >= 50 || width >= 500`. Every monitor here is 4K at scale = 1, so an
# ordinary button or list row is ~50px tall and well over 500px wide — i.e.
# basically every real control is thrown away for being "too big", and the
# only survivors are emoji and avatars. Verified on-screen: stock, a full
# Slack window got ~8 labels, all on images; patched, every channel, tab and
# button gets one.
#
# Doubling the four thresholds (and the dilate kernel that merges glyph edges
# into word blobs) is exactly the 1080p->4K ratio. None of these are exposed
# as config options in 0.4.1, so patching is the only way in. Drop this
# override if upstream makes detection DPI-aware.
# Second bug, on the rotated monitor (DP-2, transform = 1): the pointer lands
# in the wrong place because the rotation is applied twice.
#
# src/utils_wayland.c move_pointer() takes output->width/height — which come
# from `xdg_output.logical_size`, i.e. already rotated — and then runs
# _apply_transform() over them again before motion_absolute(). Hyprland's
# virtual-pointer also works in logical space, so the second rotation is pure
# error. Measured: asking for global (4000,1000) on DP-2 landed at
# (4286,3726); the double-rotation arithmetic predicts (4301,3736).
#
# Passing TRANSFORM_NORMAL makes the call a no-op while keeping the (static)
# function referenced, so no unused-function warning. Only correct for
# compositors that expect logical coords; fine here, Hyprland-only config.
wl-kbptr = pkgs.wl-kbptr.overrideAttrs (old: {
postPatch = (old.postPatch or "") + ''
substituteInPlace src/utils_wayland.c \
--replace-fail \
'&x, &y, &output_width, &output_height, state->current_output->transform' \
'&x, &y, &output_width, &output_height, WL_OUTPUT_TRANSFORM_NORMAL'
substituteInPlace src/target_detection.cpp \
--replace-fail \
'rect.height >= 50 || rect.width >= 500 || rect.height <= 3 ||' \
'rect.height >= 100 || rect.width >= 1000 || rect.height <= 6 ||' \
--replace-fail 'rect.width <= 7) {' 'rect.width <= 14) {' \
--replace-fail 'if (rect.height <= 6) {' 'if (rect.height <= 12) {' \
--replace-fail 'round(2.5 * scale), round(3.5 * scale)' \
'round(5.0 * scale), round(7.0 * scale)'
'';
});
in
{
home.packages = [ wl-kbptr ];
# wl-kbptr — move/click the pointer with the keyboard. We reorder the label
# alphabet so the easiest tiles land on the home row, set a monospace label
# font so labels stay legible over busy backgrounds, and roughly double every
# size default. Run `wl-kbptr --help-config` for the full option list.
#
# The size bump is not taste, it's DPI: every monitor here is 4K at
# `scale = 1` (see home/*/monitors.nix), and wl-kbptr paints raw cairo onto a
# layer surface, so it never sees a scale factor — GDK_SCALE only fixes GTK
# apps. Upstream's defaults are tuned for ~1080p and render half-size here.
#
# `label_font_size` is `min proportion max`, evaluated as
# clamp(area_height * proportion, min, max). In floating/detect mode the
# detected areas are buttons and icons, i.e. short, so it's the *minimum* that
# is in force for nearly every label — raising max alone would change nothing.
xdg.configFile."wl-kbptr/config".text = ''
[general]
modes=tile,bisect
[mode_tile]
label_symbols=asdfghjklqwertyuiopzxcvbnm
label_font_family=monospace
label_font_size=20 50% 120
[mode_floating]
label_symbols=asdfghjklqwertyuiopzxcvbnm
label_font_family=monospace
label_font_size=28 45% 80
[mode_bisect]
label_font_family=monospace
label_font_size=32
label_padding=20
pointer_size=32
[mode_split]
pointer_size=32
[mode_click]
button=left
'';
wayland.windowManager.hyprland.extraConfig = ''
-- wl-kbptr: keyboard pointer control.
--
-- SUPER+G "vimium for the desktop" OpenCV detects clickable regions
-- from a screencopy frame and labels them; type a label and it
-- moves the pointer to that region's centre and left-clicks.
-- Needs the HiDPI patch in kbptr.nix to find anything here.
-- SUPER+SHIFT+G tile -> bisect, for anywhere detection misses. Type the tile
-- label, then bisect with the home row; g/h/b left/right/middle
-- click, Enter/Space just parks the cursor, Backspace steps back.
--
-- Both need wlr-layer-shell + wlr-virtual-pointer (+ wlr-screencopy for
-- detect), all of which Hyprland implements.
-- spelled out rather than reusing the `mod` local from default.nix: both
-- chunks land in the same hyprland.lua but their relative order isn't pinned.
-- Guarded with `pidof` the same way hypridle's lock_cmd is. wl-kbptr only
-- exits on a keypress (main.c sets running=false solely from the keyboard
-- handler), so an overlay that loses focus before you type a label just sits
-- there holding an exclusive keyboard grab until it's killed from a shell
-- which happened here. The guard stops repeat presses stacking more of them.
hl.bind("SUPER + G", hl.dsp.exec_cmd("pidof wl-kbptr || wl-kbptr -o modes=floating,click -o mode_floating.source=detect"))
hl.bind("SUPER + SHIFT + G", hl.dsp.exec_cmd("pidof wl-kbptr || wl-kbptr"))
'';
}
@@ -90,19 +90,15 @@ in
home.file.".face".source = avatar;
# force overwrite files that noctalia may have turned into regular files
xdg.configFile."hypr/hyprland.conf".force = true;
# (Hyprland 0.55+ is Lua-only, so the managed file is now hyprland.lua)
xdg.configFile."hypr/hyprland.lua".force = true;
xdg.configFile."gtk-3.0/gtk.css".force = true;
# source noctalia-generated color theme in hyprland (v5 path).
# Hyprland globs every source path, so a missing file errors as
# "globbing error: found no match" — pre-create an empty placeholder
# so the first boot doesn't fail before noctalia has run.
home.activation.ensureNoctaliaHyprConf = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
run mkdir -p "$HOME/.config/hypr"
run touch "$HOME/.config/hypr/noctalia.conf"
'';
wayland.windowManager.hyprland.settings.source = [
"~/.config/hypr/noctalia.conf"
];
# NOTE: noctalia still writes its color theme to ~/.config/hypr/noctalia.conf
# in *hyprlang* syntax ($primary = rgb(...), general { col.active_border = ... }).
# Hyprland 0.55+ dropped the hyprlang parser entirely, so that file can no
# longer be `source`d — there is no hl.source, and the lua config can't parse
# hyprlang. Hyprland therefore uses the static border colors from
# ../default.nix instead of noctalia's themed ones. To restore live theming,
# noctalia would need to emit a Lua snippet we can require() here.
}
+1 -1
View File
@@ -1,6 +1,6 @@
{ inputs, pkgs, ... }:
{
imports = [ inputs.nvchad4nix.homeManagerModule ];
imports = [ inputs.nvchad4nix.homeManagerModules.nvchad ];
home.sessionVariables = {
EDITOR = "nvim";
};
+4
View File
@@ -2,5 +2,9 @@
{
home.packages = with pkgs; [
typescript-language-server
# nodejs_26, not the nixpkgs default 24: rev's package.json sets
# engines >=26, and its systemd unit pins the same major.
nodejs_26
pnpm
];
}
+148
View File
@@ -0,0 +1,148 @@
# Set prefix to Ctrl-a (more ergonomic than Ctrl-b)
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Enable mouse support
set -g mouse on
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# Renumber windows when one is closed
set -g renumber-windows on
# Increase scrollback buffer
set -g history-limit 50000
# Low escape-time (0 breaks Alt keys over SSH; 25ms is a good balance)
set -s escape-time 25
# Enable 256 colors
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
# -------------------------------------------------------------------
# Status bar theme
# -------------------------------------------------------------------
set -g status-position bottom
set -g status-interval 5
set -g status-style "bg=#1a1b26,fg=#a9b1d6"
# Left: session name
set -g status-left-length 30
set -g status-left "#[fg=#1a1b26,bg=#7aa2f7,bold] #S #[fg=#7aa2f7,bg=#1a1b26,nobold] "
# Right: continuum status + time
set -g status-right-length 50
set -g status-right "#[fg=#565f89] #{?client_prefix,#[fg=#e0af68]PREFIX ,}#[fg=#565f89,bg=#1a1b26] %H:%M #[fg=#1a1b26,bg=#7aa2f7,bold] %d %b "
# Window tabs
set -g window-status-format "#[fg=#565f89] #I #W "
set -g window-status-current-format "#[fg=#7aa2f7,bg=#24283b,bold] #I #W #[fg=#24283b,bg=#1a1b26]"
set -g window-status-separator ""
# Pane borders
set -g pane-border-style "fg=#3b4261"
set -g pane-active-border-style "fg=#7aa2f7"
# Message style
set -g message-style "fg=#7aa2f7,bg=#1a1b26,bold"
set -g message-command-style "fg=#7aa2f7,bg=#1a1b26"
# Copy mode
setw -g mode-style "fg=#1a1b26,bg=#7aa2f7"
# Easy config reload
bind r source-file ~/.tmux.conf \; display "Config reloaded!"
# Better pane splitting (use current path)
bind \\ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# New window in current path
bind c new-window -c "#{pane_current_path}"
# Pane resize (if you ever use tmux panes)
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Quick window switching (prefix + number)
bind 1 select-window -t 1
bind 2 select-window -t 2
bind 3 select-window -t 3
bind 4 select-window -t 4
bind 5 select-window -t 5
bind 6 select-window -t 6
bind 7 select-window -t 7
bind 8 select-window -t 8
bind 9 select-window -t 9
# Window navigation (prefix + h/l)
bind h previous-window
bind l next-window
# Session navigation (prefix + j/k/S)
bind j switch-client -n # next session
bind k switch-client -p # previous session
bind S choose-tree -sZ # session tree picker
# Move windows left/right
bind -r < swap-window -t -1\; select-window -t -1
bind -r > swap-window -t +1\; select-window -t +1
# Enable vi mode for copy
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection-and-cancel
# tmux-resurrect settings
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-nvim 'session'
# tmux-continuum settings (auto-save and auto-restore)
set -g @continuum-restore 'on'
set -g @continuum-save-interval '10'
# agent-deck configuration
# agent-deck-tmux-config-version: 3
# Added by agent-deck installer - 2026-03-18
# https://github.com/asheshgoplani/agent-deck
# Terminal with true color support
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm*:Tc:smcup@:rmcup@"
set -ag terminal-overrides ",*256col*:Tc"
# Performance
set -sg escape-time 0
set -g history-limit 50000
# Extended keys: forward Shift+Enter and other modified keys to apps (tmux 3.2+)
set -s extended-keys on
set -as terminal-features 'tmux-256color:extkeys'
# Mouse support (scroll + drag-to-copy)
set -g mouse on
# Auto-enter copy-mode when scrolling up (critical for WSL compatibility)
# This handles: 1) apps with mouse support, 2) already in copy-mode, 3) normal pane
bind-key -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# Scroll bindings in copy-mode (both vi and emacs modes)
bind-key -T copy-mode-vi WheelUpPane send-keys -X scroll-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X scroll-down
bind-key -T copy-mode WheelUpPane send-keys -X scroll-up
bind-key -T copy-mode WheelDownPane send-keys -X scroll-down
# Clipboard integration (drag-to-copy)
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
# End agent-deck configuration
+12
View File
@@ -1,5 +1,17 @@
{ pkgs, ... }:
{
programs.tmux = {
enable = true;
# The @plugin lines and the tpm bootstrap are stripped from tmux.conf:
# home-manager writes the run-shell lines for these itself, and tpm would
# otherwise try to git-clone them into ~/.tmux/plugins at runtime.
plugins = with pkgs.tmuxPlugins; [
sensible
resurrect
continuum
];
extraConfig = builtins.readFile ./tmux.conf;
};
}
+4
View File
@@ -78,6 +78,10 @@
fzf = {
enable = true;
enableZshIntegration = true;
# Both fzf and atuin bind Ctrl-R, and home-manager warns about the clash.
# Atuin is sourced last so it already won; this just makes that explicit
# and silences the warning. fzf keeps Ctrl-T and Alt-C.
historyWidget.zsh.command = "";
};
zoxide = {
+60 -68
View File
@@ -27,6 +27,8 @@
custom.hyprland = {
yaziSize = "2400 1800";
cursorSize = 42;
# The screen actually shared in every call; skips the xdph picker entirely.
shareOutput = "HDMI-A-1";
};
custom.gaming = {
@@ -38,84 +40,74 @@
# 4K@1x monitors render the Electron AI apps tiny; scale their UI up. Tune to taste.
custom.aiApps.deviceScaleFactor = "1.5";
wayland.windowManager.hyprland.settings = {
exec-once = [
# boot-into-lock: paired with SDDM autologin (host config), lock the
# session the moment Hyprland starts so a cold boot lands on hyprlock, not
# an open desktop. A brief flash before it paints is possible.
"hyprlock"
"$HOME/.local/bin/hyprpaper-rotate"
];
wayland.windowManager.hyprland.extraConfig = ''
hl.on("hyprland.start", function()
-- boot-into-lock: paired with SDDM autologin (host config), lock the
-- session the moment Hyprland starts so a cold boot lands on hyprlock, not
-- an open desktop. A brief flash before it paints is possible.
hl.exec_cmd("hyprlock")
hl.exec_cmd("$HOME/.local/bin/hyprpaper-rotate")
end)
windowrule = [
# ethui-dev
"workspace 2, match:title ethui-dev.*"
"no_initial_focus on, match:title ethui-dev.*"
"float on, match:title ethui-dev - dialog.*"
-- ethui-dev
hl.window_rule({ match = { title = "ethui-dev.*" }, workspace = "2", no_initial_focus = true })
hl.window_rule({ match = { title = "ethui-dev - dialog.*" }, float = true })
"workspace 1, match:title ethui.*"
"no_initial_focus on, match:title ethui.*"
"float on, match:title ethui - dialog.*"
hl.window_rule({ match = { title = "ethui.*" }, workspace = "1", no_initial_focus = true })
hl.window_rule({ match = { title = "ethui - dialog.*" }, float = true })
"workspace 1, match:title ^\\[bevy\\].*"
hl.window_rule({ match = { title = [[^\[bevy\].*]] }, workspace = "1" })
"workspace 3 silent, match:class bevy-.*"
"no_initial_focus on, match:class bevy-.*"
"fullscreen on, match:class bevy-.*"
hl.window_rule({ match = { class = "bevy-.*" }, workspace = "3 silent", no_initial_focus = true, fullscreen = true })
"workspace 1 silent, match:title egui-.*"
"border_size 0, match:title egui-.*"
"float on, match:title egui-.*"
"no_blur on, match:title egui-.*"
"move 100%-w-20 100%-h-20, match:title egui-.*"
hl.window_rule({
match = { title = "egui-.*" },
workspace = "1 silent",
border_size = 0,
float = true,
no_blur = true,
move = "100%-w-20 100%-h-20",
})
# gaming: Steam/Proton titles run under XWayland with WM_CLASS
# steam_app_<appid>. Send them fullscreen to workspace 3 (DP-1) — the same
# streamed workspace as Big Picture below — instead of opening tiled on
# whatever monitor Steam is on.
# Native (non-Proton) games have their own class — grab it with
# `hyprctl clients | grep -iE "class|title"` while the game runs and add a
# matching line here.
"workspace 3, match:class steam_app_.*"
"fullscreen on, match:class steam_app_.*"
-- gaming: Steam/Proton titles run under XWayland with WM_CLASS
-- steam_app_<appid>. Send them fullscreen to workspace 3 (DP-1) the same
-- streamed workspace as Big Picture below instead of opening tiled on
-- whatever monitor Steam is on.
-- Native (non-Proton) games have their own class grab it with
-- `hyprctl clients | grep -iE "class|title"` while the game runs and add a
-- matching rule here.
hl.window_rule({ match = { class = "steam_app_.*" }, workspace = "3", fullscreen = true })
# Steam Big Picture shares the plain `steam` WM_CLASS with the normal
# client, so match its title instead. Without this it opens on whatever
# monitor the cursor is on, not the streamed one. Pin it to ws3 — DP-1's
# normal persistent workspace, which is what the stream captures. `.`
# stands in for the literal spaces to keep the rule string unambiguous.
"workspace 3, match:title Steam.Big.Picture.Mode"
"fullscreen on, match:title Steam.Big.Picture.Mode"
-- Steam Big Picture shares the plain `steam` WM_CLASS with the normal
-- client, so match its title instead. Without this it opens on whatever
-- monitor the cursor is on, not the streamed one. Pin it to ws3 DP-1's
-- normal persistent workspace, which is what the stream captures. `.`
-- stands in for the literal spaces to keep the rule string unambiguous.
hl.window_rule({ match = { title = "Steam.Big.Picture.Mode" }, workspace = "3", fullscreen = true })
# Heroic (GOG/Epic launcher) streamed via Moonlight — `heroic --console`.
# Tile it on ws3 (DP-1, the captured screen) rather than letting it float
# or land on whatever monitor the cursor is on. Games it launches are
# Proton titles → caught by the steam_app_ rules above; native ones need
# their own class added here.
"workspace 3, match:class heroic"
"tile on, match:class heroic"
-- Heroic (GOG/Epic launcher) streamed via Moonlight `heroic --console`.
-- Tile it on ws3 (DP-1, the captured screen) rather than letting it float
-- or land on whatever monitor the cursor is on. Games it launches are
-- Proton titles caught by the steam_app_ rules above; native ones need
-- their own class added here.
hl.window_rule({ match = { class = "heroic" }, workspace = "3", tile = true })
# RetroArch streamed via Moonlight (also registered as a Sunshine app).
# Native Wayland app_id is `com.libretro.RetroArch` (set at map time) — the
# exact string is needed so the rule applies on spawn; a loose `retroarch`
# match misses at map and the window flashes onto the active workspace
# first. `silent` sends it to ws3 (DP-1, the captured screen) without
# yanking focus off whatever workspace you're driving from.
"workspace 3 silent, match:class com.libretro.RetroArch"
"fullscreen on, match:class com.libretro.RetroArch"
];
-- RetroArch streamed via Moonlight (also registered as a Sunshine app).
-- Native Wayland app_id is `com.libretro.RetroArch` (set at map time) the
-- exact string is needed so the rule applies on spawn; a loose `retroarch`
-- match misses at map and the window flashes onto the active workspace
-- first. `silent` sends it to ws3 (DP-1, the captured screen) without
-- yanking focus off whatever workspace you're driving from.
hl.window_rule({ match = { class = "com.libretro.RetroArch" }, workspace = "3 silent", fullscreen = true })
render = {
# Experiment: was `true`. With a fullscreen game direct-scanning-out,
# Sunshine starting a capture forces the compositor off the direct path,
# and that surface/context churn is a suspected trigger for Chromium's
# `EGL_CONTEXT_LOST` crash (Big Picture drops to software rendering mid-
# stream). Disabled to test whether the crashes stop. If it makes no
# difference, flip back to `true` for the local fullscreen latency win.
direct_scanout = false;
};
};
-- Experiment: was `true`. With a fullscreen game direct-scanning-out,
-- Sunshine starting a capture forces the compositor off the direct path,
-- and that surface/context churn is a suspected trigger for Chromium's
-- `EGL_CONTEXT_LOST` crash (Big Picture drops to software rendering mid-
-- stream). Disabled to test whether the crashes stop. If it makes no
-- difference, flip back to `true` for the local fullscreen latency win.
hl.config({ render = { direct_scanout = false } })
'';
programs.noctalia.settings = {
shell.ui_scale = 1.25;
+16 -17
View File
@@ -1,20 +1,19 @@
_:
{
wayland.windowManager.hyprland.settings = {
monitor = [
# List HDMI-A-1 first so it becomes the primary monitor (ID 0)
"HDMI-A-1, 3840x2160, 0x2160, 1"
# Then the other monitors
"DP-2, 3840x2160, 3840x180, 1, transform, 1"
"DP-1, 3840x2160, 0x0, 1"
];
workspace = [
"1, monitor:HDMI-A-1, default:true, persistent:true" # bottom-left (primary)
"2, monitor:DP-2, persistent:true" # right (vertical)
"3, monitor:DP-1, persistent:true" # top-left
"4, monitor:HDMI-A-1" # bottom-left
"5, monitor:DP-2" # right (vertical)
"6, monitor:DP-1" # top-left
];
};
# Hyprland 0.55+ is Lua-only (see home/common/programs/hyprland); monitors and
# workspace rules are expressed with the hl.* API in raw Lua.
wayland.windowManager.hyprland.extraConfig = ''
-- monitors (HDMI-A-1 listed first so it becomes the primary, ID 0)
hl.monitor({ output = "HDMI-A-1", mode = "3840x2160", position = "0x2160", scale = 1 })
hl.monitor({ output = "DP-2", mode = "3840x2160", position = "3840x180", scale = 1, transform = 1 })
hl.monitor({ output = "DP-1", mode = "3840x2160", position = "0x0", scale = 1 })
-- workspace -> monitor bindings
hl.workspace_rule({ workspace = "1", monitor = "HDMI-A-1", default = true, persistent = true }) -- bottom-left (primary)
hl.workspace_rule({ workspace = "2", monitor = "DP-2", persistent = true }) -- right (vertical)
hl.workspace_rule({ workspace = "3", monitor = "DP-1", persistent = true }) -- top-left
hl.workspace_rule({ workspace = "4", monitor = "HDMI-A-1" })
hl.workspace_rule({ workspace = "5", monitor = "DP-2" })
hl.workspace_rule({ workspace = "6", monitor = "DP-1" })
'';
}
+141
View File
@@ -0,0 +1,141 @@
default_profile = "default"
[acp]
allow_agent_install = false
allowed_agents = []
auto_stop_idle_secs = 0
compaction_reminder = false
compaction_reminder_percent = 75
default_agent = "claude"
max_concurrent_workers = 5
node_path = ""
offer_structured_in_new_session = false
rate_limit_auto_resume = false
replay_events = 0
restrict_agents = false
show_tool_durations = true
silent_orphan_grace_secs = 120
[auth]
persist_sessions = true
[diff]
context_lines = 3
split_view = false
[hooks]
[host_hooks]
[logging]
default_level = "info"
file_path = "debug.log"
keep_count = 5
max_size_mib = 50
output = "file"
rotation = "size"
show_spans = false
[logging.targets]
[sandbox]
auto_cleanup = true
container_runtime = "docker"
default_image = "ghcr.io/agent-of-empires/aoe-sandbox:latest"
default_terminal_mode = "host"
enabled_by_default = false
environment = [
"TERM",
"COLORTERM",
"FORCE_COLOR",
"NO_COLOR",
]
extra_volumes = []
mount_ssh = false
selinux_relabel = false
volume_ignores = []
volume_ignores_strategy = "anonymous"
[session]
agent_status_hooks = true
auto_resume_on_restart = true
auto_stop_idle_secs = 0
click_action = "live_send"
confirm_before_quit = false
confirm_delete = false
conversation_summary = false
default_attach_mode = "tmux"
delete_to_trash = false
favorites_first = true
inherit_host_environment = false
live_send_exit_chord = "C-q"
live_send_leader = "C-b"
live_send_on_view_switch = false
merge_hooks_into_selected_agent = true
mouse_capture = true
opencode_preassign_session_id = false
prevent_sleep_idle_grace_minutes = 15
prevent_sleep_when_active = false
restart_wake_message = "wake up: pick up what you were doing"
row_tag = "none"
show_session_colors = true
show_tips = true
smart_rename = true
smart_rename_agent = ""
snooze_duration_minutes = 30
strict_hotkeys = false
tie_workdir_to_name = true
trash_retention_days = 30
unread_indicator = true
yolo_mode_default = true
[session.agent_detect_as]
kimiclaude = "claude"
synclaude = "claude"
[session.custom_agents]
kimiclaude = "kimiclaude"
synclaude = "synclaude"
[skills]
auto_propagate = false
[sound]
enabled = false
[status_hooks]
enabled = false
[telemetry]
enabled = false
[theme]
color_mode = "truecolor"
idle_decay_minutes = 0
name = ""
[tmux]
clipboard = "auto"
mouse = "auto"
status_bar = "auto"
vt_live = true
[updates]
auto_update_plugins = false
update_check_mode = "notify"
[web]
notifications_enabled = true
notify_on_error = true
notify_on_idle = false
notify_on_waiting = true
notify_on_wake_fire = true
[worktree]
auto_cleanup = true
bare_repo_path_template = "./{branch}"
delete_branch_on_cleanup = false
enabled = true
init_submodules = true
path_template = "../{repo-name}-worktrees/{branch}"
workspace_path_template = "../{branch}-workspace-{session-id}"
+251
View File
@@ -0,0 +1,251 @@
{
"permissions": {
"allow": [
"Bash",
"Edit",
"Write",
"NotebookEdit",
"WebFetch",
"WebSearch"
],
"deny": [
"Read(~/.ssh/**)",
"Read(*.pem)",
"Read(*.key)",
"mcp__dokploy__application-one",
"mcp__dokploy__mounts-listByServiceId",
"mcp__dokploy__mounts-one",
"mcp__dokploy__compose-one",
"mcp__dokploy__schedule-create",
"mcp__dokploy__schedule-update",
"mcp__dokploy__schedule-runManually"
],
"defaultMode": "auto"
},
"model": "claude-fable-5[1m]",
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/comment-lint.py"
}
]
},
{
"matcher": "AskUserQuestion",
"hooks": [
{
"type": "command",
"command": "sh -c 'unset IFS; set -f; umask 077; [ -n \"$AOE_INSTANCE_ID\" ] || exit 0; case \"$AOE_INSTANCE_ID\" in *[!0-9a-zA-Z_-]*) exit 0 ;; esac; B=/tmp/aoe-hooks-1000; mkdir -p \"$B\" 2>/dev/null || exit 0; LS=$(LC_ALL=C ls -ldn \"$B\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; ME=$(id -u 2>/dev/null) || exit 0; [ \"$3\" = \"$ME\" ] || exit 0; D=\"$B/$AOE_INSTANCE_ID\"; mkdir -p \"$D\" 2>/dev/null; LS=$(LC_ALL=C ls -ldn \"$D\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; [ \"$3\" = \"$ME\" ] || exit 0; printf running > \"$D/status\" 2>/dev/null; exit 0 # aoe-hooks'"
}
]
}
],
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/tmux-attention.sh"
}
]
},
{
"matcher": "permission_prompt|elicitation_dialog|agent_needs_input",
"hooks": [
{
"type": "command",
"command": "sh -c 'unset IFS; set -f; umask 077; [ -n \"$AOE_INSTANCE_ID\" ] || exit 0; case \"$AOE_INSTANCE_ID\" in *[!0-9a-zA-Z_-]*) exit 0 ;; esac; B=/tmp/aoe-hooks-1000; mkdir -p \"$B\" 2>/dev/null || exit 0; LS=$(LC_ALL=C ls -ldn \"$B\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; ME=$(id -u 2>/dev/null) || exit 0; [ \"$3\" = \"$ME\" ] || exit 0; D=\"$B/$AOE_INSTANCE_ID\"; mkdir -p \"$D\" 2>/dev/null; LS=$(LC_ALL=C ls -ldn \"$D\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; [ \"$3\" = \"$ME\" ] || exit 0; printf waiting > \"$D/status\" 2>/dev/null; exit 0 # aoe-hooks'"
}
]
},
{
"matcher": "idle_prompt|agent_completed",
"hooks": [
{
"type": "command",
"command": "sh -c 'unset IFS; set -f; umask 077; [ -n \"$AOE_INSTANCE_ID\" ] || exit 0; case \"$AOE_INSTANCE_ID\" in *[!0-9a-zA-Z_-]*) exit 0 ;; esac; B=/tmp/aoe-hooks-1000; mkdir -p \"$B\" 2>/dev/null || exit 0; LS=$(LC_ALL=C ls -ldn \"$B\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; ME=$(id -u 2>/dev/null) || exit 0; [ \"$3\" = \"$ME\" ] || exit 0; D=\"$B/$AOE_INSTANCE_ID\"; mkdir -p \"$D\" 2>/dev/null; LS=$(LC_ALL=C ls -ldn \"$D\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; [ \"$3\" = \"$ME\" ] || exit 0; printf idle > \"$D/status\" 2>/dev/null; exit 0 # aoe-hooks'"
}
]
}
],
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/comms-lint.py"
}
]
},
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/tmux-reset.sh"
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "rtk hook claude"
}
]
},
{
"hooks": [
{
"type": "command",
"command": "sh -c 'unset IFS; set -f; umask 077; [ -n \"$AOE_INSTANCE_ID\" ] || exit 0; case \"$AOE_INSTANCE_ID\" in *[!0-9a-zA-Z_-]*) exit 0 ;; esac; B=/tmp/aoe-hooks-1000; mkdir -p \"$B\" 2>/dev/null || exit 0; LS=$(LC_ALL=C ls -ldn \"$B\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; ME=$(id -u 2>/dev/null) || exit 0; [ \"$3\" = \"$ME\" ] || exit 0; D=\"$B/$AOE_INSTANCE_ID\"; mkdir -p \"$D\" 2>/dev/null; LS=$(LC_ALL=C ls -ldn \"$D\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; [ \"$3\" = \"$ME\" ] || exit 0; IN=$(cat 2>/dev/null); S=running; case \"$IN\" in *\\\"tool_name\\\":\\\"AskUserQuestion\\\"*) S=waiting ;; esac; printf %s \"$S\" > \"$D/status\" 2>/dev/null; exit 0 # aoe-hooks'"
}
]
}
],
"SessionStart": [
{
"matcher": "startup|resume|clear",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/git-autoupdate.sh"
}
]
},
{
"hooks": [
{
"type": "command",
"command": "python3 ~/.claude/scripts/aoe-register-remote.py"
}
]
},
{
"hooks": [
{
"type": "command",
"command": "/home/naps62/tea/rev/scripts/rev-hook-session-start.sh"
}
]
},
{
"hooks": [
{
"type": "command",
"command": "sh -c '[ -n \"$AOE_INSTANCE_ID\" ] || exit 0; command -v aoe >/dev/null 2>&1 || exit 0; aoe __extract-session-id 2>/dev/null; exit 0 # aoe-hooks'"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "/home/naps62/tea/rev/scripts/rev-hook-stop.sh"
}
]
},
{
"hooks": [
{
"type": "command",
"command": "sh -c 'unset IFS; set -f; umask 077; [ -n \"$AOE_INSTANCE_ID\" ] || exit 0; case \"$AOE_INSTANCE_ID\" in *[!0-9a-zA-Z_-]*) exit 0 ;; esac; B=/tmp/aoe-hooks-1000; mkdir -p \"$B\" 2>/dev/null || exit 0; LS=$(LC_ALL=C ls -ldn \"$B\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; ME=$(id -u 2>/dev/null) || exit 0; [ \"$3\" = \"$ME\" ] || exit 0; D=\"$B/$AOE_INSTANCE_ID\"; mkdir -p \"$D\" 2>/dev/null; LS=$(LC_ALL=C ls -ldn \"$D\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; [ \"$3\" = \"$ME\" ] || exit 0; printf idle > \"$D/status\" 2>/dev/null; exit 0 # aoe-hooks'"
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "sh -c '[ -n \"$AOE_INSTANCE_ID\" ] || exit 0; command -v aoe >/dev/null 2>&1 || exit 0; aoe __extract-session-id 2>/dev/null; exit 0 # aoe-hooks'"
},
{
"type": "command",
"command": "sh -c 'unset IFS; set -f; umask 077; [ -n \"$AOE_INSTANCE_ID\" ] || exit 0; case \"$AOE_INSTANCE_ID\" in *[!0-9a-zA-Z_-]*) exit 0 ;; esac; B=/tmp/aoe-hooks-1000; mkdir -p \"$B\" 2>/dev/null || exit 0; LS=$(LC_ALL=C ls -ldn \"$B\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; ME=$(id -u 2>/dev/null) || exit 0; [ \"$3\" = \"$ME\" ] || exit 0; D=\"$B/$AOE_INSTANCE_ID\"; mkdir -p \"$D\" 2>/dev/null; LS=$(LC_ALL=C ls -ldn \"$D\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; [ \"$3\" = \"$ME\" ] || exit 0; printf running > \"$D/status\" 2>/dev/null; exit 0 # aoe-hooks'"
}
]
}
],
"StopFailure": [
{
"hooks": [
{
"type": "command",
"command": "sh -c 'unset IFS; set -f; umask 077; [ -n \"$AOE_INSTANCE_ID\" ] || exit 0; case \"$AOE_INSTANCE_ID\" in *[!0-9a-zA-Z_-]*) exit 0 ;; esac; B=/tmp/aoe-hooks-1000; mkdir -p \"$B\" 2>/dev/null || exit 0; LS=$(LC_ALL=C ls -ldn \"$B\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; ME=$(id -u 2>/dev/null) || exit 0; [ \"$3\" = \"$ME\" ] || exit 0; D=\"$B/$AOE_INSTANCE_ID\"; mkdir -p \"$D\" 2>/dev/null; LS=$(LC_ALL=C ls -ldn \"$D\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; [ \"$3\" = \"$ME\" ] || exit 0; printf idle > \"$D/status\" 2>/dev/null; exit 0 # aoe-hooks'"
}
]
}
],
"ElicitationResult": [
{
"hooks": [
{
"type": "command",
"command": "sh -c 'unset IFS; set -f; umask 077; [ -n \"$AOE_INSTANCE_ID\" ] || exit 0; case \"$AOE_INSTANCE_ID\" in *[!0-9a-zA-Z_-]*) exit 0 ;; esac; B=/tmp/aoe-hooks-1000; mkdir -p \"$B\" 2>/dev/null || exit 0; LS=$(LC_ALL=C ls -ldn \"$B\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; ME=$(id -u 2>/dev/null) || exit 0; [ \"$3\" = \"$ME\" ] || exit 0; D=\"$B/$AOE_INSTANCE_ID\"; mkdir -p \"$D\" 2>/dev/null; LS=$(LC_ALL=C ls -ldn \"$D\" 2>/dev/null) || exit 0; set -- $LS; M=\"$1\"; case \"$M\" in drwx------|drwx------.|drwx------+|drwx------@) ;; *) exit 0 ;; esac; [ \"$3\" = \"$ME\" ] || exit 0; printf running > \"$D/status\" 2>/dev/null; exit 0 # aoe-hooks'"
}
]
}
]
},
"worktree": {
"baseRef": "fresh"
},
"statusLine": {
"type": "command",
"command": "~/.claude/statusline.sh"
},
"enabledPlugins": {
"building@subvisual": true,
"rust-analyzer-lsp@claude-plugins-official": false,
"caveman@caveman": true
},
"extraKnownMarketplaces": {
"subvisual": {
"source": {
"source": "github",
"repo": "subvisual/harness"
}
},
"superpowers-marketplace": {
"source": {
"source": "github",
"repo": "obra/superpowers-marketplace"
}
},
"caveman": {
"source": {
"source": "github",
"repo": "JuliusBrussee/caveman"
}
}
},
"tui": "fullscreen",
"skipDangerousModePermissionPrompt": true,
"theme": "dark",
"editorMode": "vim",
"preferredNotifChannel": "auto",
"autoCompactEnabled": true,
"remoteControlAtStartup": false,
"inputNeededNotifEnabled": true,
"agentPushNotifEnabled": true,
"mcpServers": {
"playwright": {
"args": [
"-y",
"@playwright/mcp@latest"
],
"command": "npx",
"type": "stdio"
}
}
}
+52
View File
@@ -0,0 +1,52 @@
{
lib,
pkgs,
...
}:
{
imports = [
../common/programs/default.nix
../common/programs/desktop
../common/programs/hyprland
../common/programs/kitty
../common/programs/gpg.nix
../common/programs/aoe
../common/features/xdg.nix
./monitors.nix
./services.nix
./ssh.nix
];
custom.hyprland.cursorSize = 32;
# Headless browser driver the agent tooling shells out to. Was a global npm
# install on the ubuntu box.
home.packages = [ pkgs.agent-browser ];
# Both default to ~/projects/nixos-config in common/programs; this clone lives
# under ~/tea. nh.flake sets NH_FLAKE, so without it `nh home switch` with no
# argument resolves to a path that does not exist.
home.mutableFilesRepoPath = lib.mkForce "/home/naps62/tea/nixos-config";
# Host-local, not shared: this sets yolo_mode_default = true, which starts aoe
# sessions with permission checks skipped. Only correct on this box.
home.mutableFiles.".config/agent-of-empires/config.toml".source = ./aoe-config.toml;
# Likewise host-local: carries skipDangerousModePermissionPrompt and the rev
# hook paths, neither of which belong on a workstation.
home.mutableFiles.".claude/settings.json".source = lib.mkForce ./claude-settings.json;
programs.agentSkills.machine = "yolo";
programs.nh.flake = lib.mkForce "/home/naps62/tea/nixos-config";
# Blur and shadow cost a fullscreen pass per frame, and every frame here is
# also x264-encoded for the stream — on a virtio-gpu with no VirGL, in software.
wayland.windowManager.hyprland.extraConfig = ''
hl.config({
decoration = {
blur = { enabled = false },
shadow = { enabled = false },
},
})
'';
}
+11
View File
@@ -0,0 +1,11 @@
_:
{
# Hyprland 0.55+ is Lua-only (see home/common/programs/hyprland).
#
# Matches every output rather than naming one: the virtio-gpu connector name
# varies by qemu display backend (Virtual-1 vs Virtual-0). Explicit mode, not
# `preferred` — this is the resolution Sunshine streams.
wayland.windowManager.hyprland.extraConfig = ''
hl.monitor({ output = "", mode = "2560x1440@60", position = "0x0", scale = 1 })
'';
}
+124
View File
@@ -0,0 +1,124 @@
{
pkgs,
inputs,
...
}:
# The user services this box exists to run, ported from hand-written units in
# ~/.config/systemd/user on the Ubuntu machine.
#
# NOT self-contained: every ExecStart under ~/.bun or ~/.local/bin is an
# imperatively-installed binary, and the WorkingDirectories are clones of
# separate repos. Nix owns the unit definitions here, nothing more.
let
# A user unit gets almost no PATH by default; these are the profile dirs the
# original units got for free from the system PATH on Ubuntu.
toolPath = "%h/.local/bin:%h/.nix-profile/bin:/etc/profiles/per-user/naps62/bin:/run/current-system/sw/bin";
sem = inputs.sem.packages.${pkgs.system}.default;
in
{
home.packages = [
sem
pkgs.bun
];
systemd.user.services = {
rev = {
Unit = {
Description = "rev always-on local code review server";
After = [ "network.target" ];
};
Service = {
Type = "simple";
WorkingDirectory = "%h/tea/rev";
# nodejs_26, not pkgs.nodejs: rev's package.json sets engines >=26 and
# the nixpkgs default is 24.
ExecStart = "${pkgs.nodejs_26}/bin/node server/index.ts";
Environment = [
"NODE_ENV=production"
"REV_ROOTS=%h"
"REV_DEPTH=3"
"REV_SEM_BIN=${sem}/bin/sem"
"PATH=${toolPath}"
];
Restart = "always";
RestartSec = 2;
};
Install.WantedBy = [ "default.target" ];
};
rev-deploy = {
Unit = {
Description = "rev-deploy Gitea webhook listener that deploys rev on push to main";
After = [ "network.target" ];
};
Service = {
Type = "simple";
WorkingDirectory = "%h/tea/rev";
ExecStart = "${pkgs.bun}/bin/bun scripts/deploy-webhook.ts";
EnvironmentFile = "%h/.config/rev/deploy.env";
Environment = [ "PATH=${toolPath}" ];
Restart = "always";
RestartSec = 2;
};
Install.WantedBy = [ "default.target" ];
};
hourlog = {
Unit = {
Description = "Start the Friday hour log in a tmux session";
Documentation = [ "https://git.naps.pt/yolo/agent-skills" ];
ConditionPathIsDirectory = "%h/tea/agent-skills";
};
Service = {
Type = "oneshot";
ExecStart = "%h/tea/agent-skills/bin/hourlog-session.sh";
Environment = [ "PATH=${toolPath}" ];
# This unit may be what starts the tmux server; the default cgroup kill
# would take it back down as soon as ExecStart returns.
KillMode = "process";
};
};
week-review = {
Unit = {
Description = "Start the weekly agent-skills review in a tmux session";
Documentation = [ "https://git.naps.pt/yolo/agent-skills" ];
ConditionPathIsDirectory = "%h/tea/agent-skills";
};
Service = {
Type = "oneshot";
ExecStart = "%h/tea/agent-skills/bin/week-review-session.sh";
Environment = [ "PATH=${toolPath}" ];
KillMode = "process";
};
};
};
systemd.user.timers = {
hourlog = {
Unit.Description = "Friday hour log, 18:00 Europe/Lisbon";
Timer = {
# Zone suffix pinned because the machine clock is UTC; keeps it at 18:00
# wall time across DST.
OnCalendar = "Fri 18:00 Europe/Lisbon";
Persistent = true;
AccuracySec = "1min";
};
Install.WantedBy = [ "timers.target" ];
};
week-review = {
Unit.Description = "Weekly agent-skills review, Fridays 17:00 Europe/Lisbon";
Timer = {
OnCalendar = "Fri 17:00 Europe/Lisbon";
Persistent = true;
AccuracySec = "1min";
};
Install.WantedBy = [ "timers.target" ];
};
};
}
+43
View File
@@ -0,0 +1,43 @@
_:
# Homelab host aliases, yolo-only. Ported from the hand-written ~/.ssh/config
# on the Ubuntu box.
{
programs.ssh.settings = {
"grafana" = {
HostName = "10.6.10.30";
User = "root";
IdentityFile = "~/.ssh/crowdsec-loki-10.6.10.30";
};
"jellyfin" = {
HostName = "10.6.10.18";
User = "root";
IdentityFile = "~/.ssh/crowdsec-loki-10.6.10.30";
};
"authelia" = {
HostName = "10.6.10.42";
User = "root";
IdentityFile = "~/.ssh/authelia-10.6.10.42";
};
"whisper" = {
HostName = "10.6.10.43";
User = "root";
IdentityFile = "~/.ssh/wyoming-voice";
IdentitiesOnly = true;
StrictHostKeyChecking = "accept-new";
};
"proxmox" = {
HostName = "10.1.10.3";
Port = 22022;
User = "root";
IdentityFile = "~/.ssh/proxmox-temp";
# Was `crowdsec-loki` in the hand-written config, which is no longer a
# Host — same machine, now aliased `grafana`.
ProxyJump = "grafana";
StrictHostKeyChecking = "accept-new";
};
};
}
+5
View File
@@ -6,6 +6,11 @@
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
# Required for LE Audio (BAP): ISO sockets / CIS live behind
# BlueZ's experimental gate. Without this the XM6 falls back to
# classic A2DP, and mic use forces the HSP/HFP downgrade.
Experimental = true;
KernelExperimental = true;
};
};
};
@@ -13,6 +13,14 @@
# GTK/GNOME services still useful on Wayland
programs.dconf.enable = true;
# Route the Secret portal (org.freedesktop.portal.Secret) to gnome-keyring.
# Hyprland's portal doesn't implement Secret, and the preferred backend list
# (hyprland;gtk) has no Secret provider — so without this, the portal exposes
# no Secret interface at all. Electron apps (e.g. Claude Desktop) fetch their
# token-encryption key through this portal; when it's missing, os_crypt init
# fails (prev_init_success:false) and they can't persist a login across boots.
xdg.portal.config.common."org.freedesktop.impl.portal.Secret" = "gnome-keyring";
services = {
# thumbnail support for images
tumbler.enable = true;
+25
View File
@@ -7,5 +7,30 @@
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# Disable the LC3-SWB HFP codec. BlueZ 5.86's experimental LC3 super-wideband
# headset path (lit up by hardware.bluetooth Experimental=true) is broken for
# the Sony WF-1000XM6: when a call opens the mic, WirePlumber auto-switches to
# the highest-priority headset profile (LC3-SWB), the audio link fails to set
# up ("Hands-Free Voice gateway: Transport endpoint is not connected"), and the
# buds reset with no call audio/mic. Omitting lc3_swb from the codec allow-list
# makes autoswitch fall back to mSBC, which is stable wideband voice. Everything
# else (A2DP LDAC/AAC/SBC, and lc3 for any future LE Audio) stays enabled.
wireplumber.extraConfig."51-disable-lc3swb-hfp" = {
"monitor.bluez.properties" = {
"bluez5.codecs" = [
"sbc"
"sbc_xq"
"aac"
"aptx"
"aptx_hd"
"aptx_ll"
"ldac"
"lc3"
"cvsd"
"msbc"
];
};
};
};
}
+42
View File
@@ -0,0 +1,42 @@
_:
# Sunshine as a remote desktop. Same wlr-screencopy capture as
# features/gaming/sunshine.nix, minus its NVIDIA workarounds: no cudaSupport
# (virtio-gpu has no NVENC, so this software-encodes) and no uhid rule.
#
# First run: https://<host>:47990 to set web-UI credentials, then pair Moonlight.
{
# Sunshine opens /dev/dri/renderD* once per encoder probe and never closes
# them — ~973 fds against the 1024 default. Mesa then cannot dlopen the GBM
# driver ("Too many open files"), capture falls back to a broken path, and
# moonlight shows a black, artefacted picture rather than any error.
systemd.user.services.sunshine.serviceConfig.LimitNOFILE = 65536;
services.sunshine = {
enable = true;
autoStart = true;
openFirewall = true;
capSysAdmin = false; # wlr-screencopy needs no CAP_SYS_ADMIN
settings = {
# MUST be set. Auto-probe tries portalgrab first, and
# xdg-desktop-portal-hyprland implements no RemoteDesktop interface — the
# probe then hangs forever instead of falling back, so sunshine never
# binds its ports and the unit sits "active" doing nothing.
#
# "wlr", not "wlgrab": wlgrab is the name this backend logs under, but it
# is not accepted as a value — sunshine rejects it with "Unable to
# initialize capture method", then still starts and binds its ports with
# no encoder, so the failure only shows up as a 503 in moonlight.
capture = "wlr";
# The web UI is only reachable over the network here — there is no local
# browser — and sunshine CSRF-rejects any origin but localhost unless it
# is listed. Both addresses: .250.1 now, .10.2 after the IP handover.
#
# Bare comma-separated, NOT a JSON array: sunshine splits this on commas
# and never strips brackets or quotes, so "[...]" makes every entry fail
# its starts_with("https://") check.
csrf_allowed_origins = "https://10.7.250.1:47990,https://10.7.10.2:47990";
};
};
}
+1 -1
View File
@@ -20,7 +20,7 @@
let
authorizedKeys = pkgs.fetchurl {
url = "https://github.com/naps62.keys";
sha256 = "sha256-KNei7flY0a+dIHdJjeU1+MQGAZRoz8RJnNS75svDIBY=";
sha256 = "sha256-sjZVywzw6q4v0QMkOpjxnjAz1MononyY+qtEFX2U8hI=";
};
in
pkgs.lib.splitString "\n" (builtins.readFile authorizedKeys);
+6
View File
@@ -33,6 +33,12 @@
services.dbus.packages = with pkgs; [ gcr ];
# NixOS provides /bin/sh but not /bin/bash. Some third-party scripts
# hardcode #!/bin/bash, so provide it too.
system.activationScripts.binbash = ''
ln -sf ${pkgs.bash}/bin/bash /bin/bash
'';
# Compressed RAM swap — better behaviour under memory pressure.
zramSwap.enable = true;
+90
View File
@@ -0,0 +1,90 @@
# yolo — Proxmox VM settings
Hypervisor-side configuration for VM 132. Nix cannot express any of it, and
three of these are load-bearing in ways that fail silently if changed.
```
qm create 132 --name yolo \
--cores 8 --sockets 1 --cpu host \
--memory 16384 \
--machine q35 \
--bios ovmf \
--ostype l26 \
--scsihw virtio-scsi-single \
--scsi0 data:400,discard=on,iothread=1,ssd=1 \
--efidisk0 data:1,efitype=4m,pre-enrolled-keys=0 \
--net0 virtio,bridge=vmbr0,tag=7,firewall=1 \
--vga virtio-gl \
--serial0 socket \
--agent 1 \
--onboot 1
```
After creating the disk, drop its ZFS reservation — the `data` pool has no
`sparse` flag, so a 400G zvol otherwise reserves all 400G up front:
```
zfs set refreservation=none data/vm-132-disk-1
```
## The three that matter
**`--vga virtio-gl`.** Not for speed — the host's virglrenderer falls back to
llvmpipe either way. It is what lets mesa allocate GBM buffers. With plain
`virtio` every capture fails with `Failed to create GBM buffer`, and sunshine
streams a black picture while reporting no error at all.
**`--serial0 socket`.** `virtio-gl` renders through a GL context with no QEMU
console surface, so the Proxmox noVNC console and `qm screendump` both go dark.
This plus `boot.kernelParams = [ "console=ttyS0,115200" ]` keeps
`qm terminal 132` working as the only out-of-band way in.
**`--bios ovmf`.** `hosts/common/features/user.nix` uses systemd-boot, which
needs UEFI. SeaBIOS gives an unbootable disk.
## Known limit: no GPU acceleration
The guest reports `virgl (LLVMPIPE)`, so compositing and capture readback are
both on CPU. Hyprland delivers ~2fps at 2560x1440, sunshine asks for 60, and
moonlight disconnects. Capture and encoding are otherwise fine — x264 manages
1440p at 3x realtime here.
The host can do better: `iris_dri.so` is present and `i915` is loaded on
renderD128 (the UHD 770; renderD129 is the nvidia card, reserved for LXCs and
not available to VMs). Two things stop it being used:
- pve 8.4.1 hardcodes `-display egl-headless,gl=core` in
`/usr/share/perl5/PVE/QemuServer.pm` with no `rendernode=`, so qemu picks the
EGL device itself.
- `/usr/share/glvnd/egl_vendor.d/` lists `10_nvidia.json` ahead of
`50_mesa.json`, and lower wins — so EGL initialises against nvidia and falls
back to llvmpipe.
To test the diagnosis without changing anything, start the VM with the mesa
vendor forced:
```
__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json qm start 132
```
If the guest then reports `iris` rather than `LLVMPIPE`, persist it with a
drop-in rather than by editing the packaged perl — drop-ins survive upgrades,
and the nvidia LXCs are unaffected because they start via pve-container:
```
systemctl edit pvedaemon
[Service]
Environment=__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
```
Last resort only, if EGL still picks wrong: append
`,rendernode=/dev/dri/renderD128` to the QemuServer.pm line above. That edits a
packaged file and is reverted by any pve-manager upgrade.
## Network
`tag=7` puts the guest on the VLAN behind `10.7.10.1`. That VLAN is the
UNTRUSTED zone: internet and DNS are allowed, private networks are denied by
default. Reaching `10.6.10.0/24` or the wireguard clients on `10.10.0.0/24`
needs an OPNsense pass rule on the UNTRUSTED interface, above
"Allow access to the Internet but block access to private networks".
+88
View File
@@ -0,0 +1,88 @@
{
lib,
pkgs,
...
}:
{
imports = [
./hardware-configuration.nix
../common/global
../common/features/user.nix
../common/features/networking.nix
../common/features/display
../common/features/pipewire.nix
../common/features/remote-desktop.nix
../common/features/docker.nix
../common/features/fonts.nix
../common/features/nix-ld.nix
../common/features/appimage.nix
../common/features/home
];
# Hypervisor-side settings this host depends on are in ./PROXMOX.md —
# `vga: virtio-gl` in particular, without which sunshine captures a black
# screen and reports no error.
networking.hostName = "yolo";
# Lets the Proxmox host drive clean shutdowns/reboots and report the guest's
# IP. The qemu-guest profile in hardware-configuration.nix only sets up the
# virtio drivers; the agent itself is a separate service.
services.qemuGuest.enable = true;
# Hung shutdown waiting on systemd-zram-setup@zram0: deactivating zram swap
# has to fault every stored page back into RAM first. Redundant here anyway —
# this VM has a real 8G swap partition, and the host manages its own memory.
zramSwap.enable = lib.mkForce false;
# The only out-of-band way in. `vga: virtio-gl` renders through a GL context
# with no QEMU console surface, so noVNC and screendump both go dark; this
# pairs with the VM's serial0 socket to keep `qm terminal` working. Listed
# last so it wins /dev/console and gets the getty.
boot.kernelParams = [
"console=tty1"
"console=ttyS0,115200"
];
# Not a security downgrade: naps62 is in `docker`, which is already
# root-equivalent, and sshd is key-only — so the prompt guards nothing while
# blocking unattended rebuilds (nh shells out to sudo and needs a TTY).
security.sudo.wheelNeedsPassword = false;
# Nix shells out to git for the `type = "git"` flake inputs (hyprland).
# Without it at system level, a fresh install cannot build the home config
# that would have provided git — so neither rebuild works.
environment.systemPackages = [ pkgs.git ];
# This clone lives under ~/tea, not the ~/projects path global/nix.nix assumes.
programs.nh.flake = lib.mkForce "/home/naps62/tea/nixos-config";
# No physical seat: Sunshine is a user service and cannot capture until a
# graphical session exists, so a cold boot must reach one unattended. No
# hyprlock on start (unlike konishi) — nobody could type the password in.
services.displayManager = {
autoLogin = {
enable = true;
user = "naps62";
};
defaultSession = "hyprland";
};
# A Proxmox guest has no emulated sound card, so PipeWire starts with no sink
# and Sunshine has nothing to capture — the stream is silent. This sink is the
# only one, so it wins the default and Sunshine records its monitor.
services.pipewire.extraConfig.pipewire."10-null-sink" = {
"context.objects" = [
{
factory = "adapter";
args = {
"factory.name" = "support.null-audio-sink";
"node.name" = "sunshine-sink";
"node.description" = "Sunshine";
"media.class" = "Audio/Sink";
"audio.position" = "FL,FR";
};
}
];
};
}
+52
View File
@@ -0,0 +1,52 @@
{
config,
lib,
modulesPath,
...
}:
# Proxmox guest (VM 132), q35 + OVMF. Hand-written rather than generated:
# filesystems are matched by label, set when the disk is partitioned, so this
# stays valid if the VM is ever rebuilt from scratch.
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot = {
initrd.availableKernelModules = [
"ahci"
"xhci_pci"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
# In the initrd, not kernelModules: otherwise there is no DRM device until
# late boot and SDDM races it.
initrd.kernelModules = [ "virtio_gpu" ];
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}