diff options
| author | 2026-05-22 10:41:23 +0100 | |
|---|---|---|
| committer | 2026-05-22 10:41:23 +0100 | |
| commit | 4c25f9b12269fcb4ea49f076b8d9f79e672c8072 (patch) | |
| tree | 11837b22b50c663e880c8d2bedfcb73cb1b3a5b4 /.github | |
| parent | 5070187ab99b09ca22514f228f079d032745bde8 (diff) | |
| download | dotfiles-4c25f9b12269fcb4ea49f076b8d9f79e672c8072.tar.gz dotfiles-4c25f9b12269fcb4ea49f076b8d9f79e672c8072.tar.bz2 dotfiles-4c25f9b12269fcb4ea49f076b8d9f79e672c8072.zip | |
docs(rules): document nix/vm.nix symlink invariant
Make it explicit that adding, removing, or renaming any chezmoi-deployed
config requires a matching update to nix/vm.nix's xdg.configFile /
home.file blocks when the corresponding binary is in common.nix.
Drives the audit performed in the previous commit.
Diffstat (limited to '.github')
| -rw-r--r-- | .github/copilot-instructions.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 34ea40b..a07e728 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -59,3 +59,14 @@ When editing shell config, all zsh configuration goes in `dot_config/zsh/` — d ## Keybinds reference `KEYBINDS.md` at the repository root documents every non-default keybind across neovim, zellij, zsh, ghostty, and sway. Whenever you add, remove, or change a keybind in any of these tools, you must update `KEYBINDS.md` to reflect the change in the same commit. + +## Nix VM symlink invariant + +The remote-dev Ubuntu VM does NOT run chezmoi. It re-uses configs via Home-Manager symlinks declared in `nix/vm.nix` (the `xdg.configFile` and `home.file` blocks point at `~/.local/share/dotfiles/<source-path>`). Whenever you **add, remove, or rename** any file or directory under `dot_config/` (or any other chezmoi source path like `dot_claude/`, `private_dot_ssh/`), audit `nix/vm.nix` in the same commit and: + +- If the corresponding binary is provisioned by `nix/common.nix` and is relevant on the headless VM (i.e. not a GUI/wayland tool like sway/mako/waybar/fuzzel/mpv/zathura), **add a matching `xdg.configFile."<dest>".source = link "<source-path>";` entry**. +- If a config is renamed or removed, update / drop the corresponding `link` entry — otherwise `home-manager switch` will fail or leave a dangling symlink. +- Chezmoi attribute prefixes (`executable_`, `private_`, `dot_`) are stripped by chezmoi but NOT by `mkOutOfStoreSymlink`. Map each prefixed source filename to its stripped destination explicitly (see the git-hooks block in `nix/vm.nix` for the reference pattern). +- Paths outside `~/.config/` (e.g. `~/.claude/skills/…`) use `home.file."<dest>".source = link "<source-path>";` instead of `xdg.configFile`. + +Treat the symlink block as part of the chezmoi source tree: a config that lands on the host via chezmoi but not on the VM via nix is the bug class this rule prevents. |
