@sebastienrousseau/dotfiles 0.2.519 → 0.2.521

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/CHANGELOG.md +200 -0
  2. package/LICENSE-APACHE +190 -0
  3. package/{LICENSE → LICENSE-MIT} +1 -1
  4. package/README.md +1172 -166
  5. package/install.sh +77 -11
  6. package/package.json +8 -8
  7. package/tools/README.md +49 -0
  8. package/tools/ci/install-chezmoi-verified.sh +68 -0
  9. package/docs/.vitepress/reports/localization-readability-audit.md +0 -73
  10. package/docs/AI.md +0 -179
  11. package/docs/CNAME +0 -1
  12. package/docs/CONFIG_STRATEGY.md +0 -124
  13. package/docs/COPYRIGHT +0 -7
  14. package/docs/GOVERNANCE.md +0 -98
  15. package/docs/MAINTAINERS.md +0 -41
  16. package/docs/NAMING_CONVENTIONS.md +0 -102
  17. package/docs/OPENCODE.md +0 -127
  18. package/docs/README.md +0 -84
  19. package/docs/STRUCTURE.md +0 -102
  20. package/docs/adr/ADR-001-ci-cd-pipeline.md +0 -118
  21. package/docs/adr/ADR-002-shell-performance.md +0 -130
  22. package/docs/adr/ADR-003-security-first.md +0 -158
  23. package/docs/adr/ADR-004-cli-architecture.md +0 -171
  24. package/docs/adr/ADR-005-chezmoi-choice.md +0 -99
  25. package/docs/adr/ADR-006-shell-selection.md +0 -124
  26. package/docs/adr/ADR-007-multi-shell-parity.md +0 -62
  27. package/docs/adr/ADR-008-alias-system-architecture.md +0 -95
  28. package/docs/adr/ADR-009-wallpaper-driven-theming.md +0 -131
  29. package/docs/adr/ADR-010-starship-transient-prompt.md +0 -144
  30. package/docs/adr/ADR-011-nushell-tier3-keep.md +0 -144
  31. package/docs/adr/ADR-012-ai-fleet-local-proxy.md +0 -79
  32. package/docs/adr/README.md +0 -40
  33. package/docs/architecture/AI_COST_OPTIMIZATION.md +0 -144
  34. package/docs/architecture/ARCHITECTURE.md +0 -117
  35. package/docs/architecture/INTEROP.md +0 -44
  36. package/docs/architecture/REPO_LAYOUT.md +0 -241
  37. package/docs/architecture/WALKTHROUGH.md +0 -86
  38. package/docs/architecture/fleet-deployment.md +0 -77
  39. package/docs/archive/EUXIS_2026_REVIEW.md +0 -127
  40. package/docs/archive/LEGACY_ROADMAP.md +0 -6
  41. package/docs/archive/MILESTONE_v0.2.493.md +0 -47
  42. package/docs/archive/PLAN.md +0 -199
  43. package/docs/archive/REPO_AUDIT.md +0 -31
  44. package/docs/articles/.pages +0 -6
  45. package/docs/articles/2026-07-05-custom-mkdocs-material-dark-theme.md +0 -216
  46. package/docs/articles/2026-07-05-fish-startup-abbr.md +0 -153
  47. package/docs/articles/2026-07-05-master-to-main-rename-runbook.md +0 -128
  48. package/docs/articles/index.md +0 -36
  49. package/docs/guides/INSTALL.md +0 -144
  50. package/docs/guides/NEOVIM_IDE_GUIDE.md +0 -61
  51. package/docs/guides/THEMING.md +0 -230
  52. package/docs/guides/TROUBLESHOOTING.md +0 -176
  53. package/docs/guides/WSL2_NIX_TROUBLESHOOTING.md +0 -792
  54. package/docs/index.md +0 -132
  55. package/docs/interop/A2A.md +0 -39
  56. package/docs/interop/POWERSHELL.md +0 -102
  57. package/docs/manual/00-introduction.md +0 -89
  58. package/docs/manual/01-concepts/01-architecture.md +0 -138
  59. package/docs/manual/01-concepts/02-trust-model.md +0 -183
  60. package/docs/manual/01-concepts/03-theme-engine.md +0 -186
  61. package/docs/manual/01-concepts/04-fleet.md +0 -148
  62. package/docs/manual/01-concepts/05-self-healing.md +0 -204
  63. package/docs/manual/02-tutorials/01-first-install.md +0 -197
  64. package/docs/manual/02-tutorials/02-add-wallpaper.md +0 -216
  65. package/docs/manual/02-tutorials/03-create-profile.md +0 -244
  66. package/docs/manual/02-tutorials/04-encrypt-secret.md +0 -281
  67. package/docs/manual/02-tutorials/05-deploy-fleet.md +0 -283
  68. package/docs/manual/03-reference/01-dot-cli.md +0 -450
  69. package/docs/manual/03-reference/02-config-files.md +0 -265
  70. package/docs/manual/03-reference/03-environment.md +0 -124
  71. package/docs/manual/03-reference/04-templates.md +0 -190
  72. package/docs/manual/03-reference/05-feature-flags.md +0 -187
  73. package/docs/manual/04-cookbook/01-recipes.md +0 -285
  74. package/docs/manual/04-cookbook/02-troubleshooting.md +0 -351
  75. package/docs/manual/04-cookbook/03-faq.md +0 -175
  76. package/docs/manual/05-appendices/A-platform-matrix.md +0 -101
  77. package/docs/manual/05-appendices/B-security-checklist.md +0 -85
  78. package/docs/manual/05-appendices/C-glossary.md +0 -40
  79. package/docs/manual/05-appendices/D-bibliography.md +0 -58
  80. package/docs/manual/05-appendices/E-license.md +0 -38
  81. package/docs/manual/_toc.yml +0 -58
  82. package/docs/manual/command-index.md +0 -155
  83. package/docs/manual/concept-index.md +0 -168
  84. package/docs/manual/index.md +0 -66
  85. package/docs/operations/ARCHITECTURE_ROADMAP.md +0 -7
  86. package/docs/operations/ATTESTATION.md +0 -44
  87. package/docs/operations/CI_CADENCE.md +0 -107
  88. package/docs/operations/CI_COMPOSITES.md +0 -156
  89. package/docs/operations/COMPLETIONS.md +0 -123
  90. package/docs/operations/COVERAGE.md +0 -204
  91. package/docs/operations/DRIFT.md +0 -107
  92. package/docs/operations/HARD_AUDIT_2026.md +0 -631
  93. package/docs/operations/MAINTENANCE.md +0 -63
  94. package/docs/operations/MANIFEST.md +0 -127
  95. package/docs/operations/MIGRATION.md +0 -109
  96. package/docs/operations/OPERATIONS.md +0 -188
  97. package/docs/operations/PERFORMANCE.md +0 -133
  98. package/docs/operations/REGISTRY.md +0 -90
  99. package/docs/operations/RELEASE_PIPELINE.md +0 -128
  100. package/docs/operations/RELIABILITY.md +0 -122
  101. package/docs/operations/RFC_v0_2_503_reorganization.md +0 -280
  102. package/docs/operations/ROADMAP.md +0 -10
  103. package/docs/operations/ROADMAP_2026.md +0 -7
  104. package/docs/operations/ROADMAP_V0_2_503.md +0 -10
  105. package/docs/operations/TESTING.md +0 -216
  106. package/docs/operations/TRACEABILITY.md +0 -43
  107. package/docs/operations/TRUSTED_AGENT_WORKSTATION.md +0 -65
  108. package/docs/operations/VERSION_SYNC.md +0 -393
  109. package/docs/reference/ALIASES.md +0 -131
  110. package/docs/reference/ALIASES_CHEATSHEET.md +0 -32
  111. package/docs/reference/ALIASES_DEPRECATIONS.md +0 -13
  112. package/docs/reference/FEATURES.md +0 -66
  113. package/docs/reference/FONTS.md +0 -112
  114. package/docs/reference/POWERSHELL_PARITY.md +0 -82
  115. package/docs/reference/PROFILES.md +0 -69
  116. package/docs/reference/SCREENSHOTS.md +0 -121
  117. package/docs/reference/SCRIPTS.md +0 -71
  118. package/docs/reference/SUPPORT_MATRIX.md +0 -80
  119. package/docs/reference/THEMES.md +0 -117
  120. package/docs/reference/TOOLS.md +0 -110
  121. package/docs/reference/UTILS.md +0 -242
  122. package/docs/registry.json +0 -6
  123. package/docs/schema/dot-env-v1.json +0 -110
  124. package/docs/schema/dot-registry-v1.json +0 -33
  125. package/docs/security/AI_ACT_COMPLIANCE.md +0 -94
  126. package/docs/security/AUDIT_BYPASS.md +0 -103
  127. package/docs/security/AUTOMATION_SECRETS.md +0 -26
  128. package/docs/security/CI_EGRESS_ALLOWLIST.md +0 -127
  129. package/docs/security/CI_PINNING.md +0 -129
  130. package/docs/security/COMMIT_SIGNING.md +0 -138
  131. package/docs/security/COMPLIANCE.md +0 -458
  132. package/docs/security/DEPS_DEV_EXCEPTIONS.md +0 -86
  133. package/docs/security/DISCLOSURE.md +0 -130
  134. package/docs/security/ENCRYPTION.md +0 -57
  135. package/docs/security/FMEA.md +0 -159
  136. package/docs/security/FUZZING.md +0 -114
  137. package/docs/security/HISTORY_FILTERING.md +0 -132
  138. package/docs/security/INCIDENT_RESPONSE.md +0 -579
  139. package/docs/security/INSTALL_VERIFICATION.md +0 -122
  140. package/docs/security/KEYS.md +0 -49
  141. package/docs/security/KEY_ROTATION.md +0 -303
  142. package/docs/security/MCP_POLICY.md +0 -78
  143. package/docs/security/POLICY_RELEASES.md +0 -37
  144. package/docs/security/README.md +0 -28
  145. package/docs/security/SCORECARD.md +0 -195
  146. package/docs/security/SECRETS.md +0 -158
  147. package/docs/security/SECURITY.md +0 -45
  148. package/docs/security/SECURITY_CHECKLIST.md +0 -55
  149. package/docs/security/SHELL_EXEMPTIONS.md +0 -145
  150. package/docs/security/SOUP_REGISTER.md +0 -36
  151. package/docs/security/THREAT_MODEL.md +0 -130
  152. package/docs/security/VERIFICATION_VALIDATION.md +0 -228
  153. package/docs/security/VERIFY_RELEASE.md +0 -201
  154. package/docs/security/security-pubkey.asc +0 -15
  155. package/docs/stylesheets/extra.css +0 -444
  156. package/docs/themes/README.md +0 -10
  157. package/docs/themes/VISUAL_INTEGRITY_REPORT.md +0 -30
  158. package/docs/themes/hero-shot.svg +0 -78
  159. package/scripts/README.md +0 -123
  160. package/scripts/ci/check-copyright-headers.sh +0 -8
  161. package/scripts/ci/check-shell-preamble.sh +0 -8
  162. package/scripts/ci/guard-gitleaks-checkout.sh +0 -8
  163. package/scripts/demo/record.sh +0 -43
  164. package/scripts/diagnostics/a2a-conformance.sh +0 -163
  165. package/scripts/diagnostics/alias-governance.sh +0 -138
  166. package/scripts/diagnostics/aliases-cheatsheet.sh +0 -74
  167. package/scripts/diagnostics/aliases-manifest.sh +0 -77
  168. package/scripts/diagnostics/benchmark.sh +0 -408
  169. package/scripts/diagnostics/conflicts.sh +0 -73
  170. package/scripts/diagnostics/doctor-unified.sh +0 -39
  171. package/scripts/diagnostics/doctor.sh +0 -751
  172. package/scripts/diagnostics/drift-dashboard.sh +0 -202
  173. package/scripts/diagnostics/health.sh +0 -623
  174. package/scripts/diagnostics/history-analysis.sh +0 -86
  175. package/scripts/diagnostics/mcp-doctor.sh +0 -582
  176. package/scripts/diagnostics/perf.sh +0 -453
  177. package/scripts/diagnostics/scorecard.sh +0 -119
  178. package/scripts/diagnostics/secret-governance.sh +0 -65
  179. package/scripts/diagnostics/security-score.sh +0 -467
  180. package/scripts/diagnostics/smoke-test.sh +0 -88
  181. package/scripts/diagnostics/snapshot.sh +0 -90
  182. package/scripts/diagnostics/verify.sh +0 -108
  183. package/scripts/diagnostics/verify_state.sh +0 -73
  184. package/scripts/diagnostics/version-locks.sh +0 -94
  185. package/scripts/diagnostics/workstation-attestation.sh +0 -187
  186. package/scripts/dot/commands/agent.sh +0 -485
  187. package/scripts/dot/commands/agents.sh +0 -336
  188. package/scripts/dot/commands/ai.sh +0 -587
  189. package/scripts/dot/commands/aliases.sh +0 -277
  190. package/scripts/dot/commands/appearance.sh +0 -110
  191. package/scripts/dot/commands/completion.sh +0 -134
  192. package/scripts/dot/commands/core.sh +0 -217
  193. package/scripts/dot/commands/diagnostics.sh +0 -265
  194. package/scripts/dot/commands/env-emit.sh +0 -203
  195. package/scripts/dot/commands/fleet.sh +0 -688
  196. package/scripts/dot/commands/init.sh +0 -185
  197. package/scripts/dot/commands/lint.sh +0 -208
  198. package/scripts/dot/commands/manual.sh +0 -169
  199. package/scripts/dot/commands/meta.sh +0 -333
  200. package/scripts/dot/commands/patterns.sh +0 -55
  201. package/scripts/dot/commands/registry.sh +0 -419
  202. package/scripts/dot/commands/restore.sh +0 -232
  203. package/scripts/dot/commands/secrets.sh +0 -296
  204. package/scripts/dot/commands/security.sh +0 -102
  205. package/scripts/dot/commands/tools.sh +0 -556
  206. package/scripts/dot/data/alias-deprecations.tsv +0 -2
  207. package/scripts/dot/powershell/Dot.psm1 +0 -319
  208. package/scripts/fonts/install-nerd-fonts.sh +0 -75
  209. package/scripts/fonts/patch-fonts.sh +0 -36
  210. package/scripts/git-hooks/install.sh +0 -12
  211. package/scripts/git-hooks/pre-commit +0 -12
  212. package/scripts/git-hooks/pre-commit-audit.sh +0 -146
  213. package/scripts/git-hooks/pre-push +0 -105
  214. package/scripts/git-hooks/prepare-commit-msg +0 -29
  215. package/scripts/lib/secrets_provider.sh +0 -185
  216. package/scripts/ops/ai-setup.sh +0 -71
  217. package/scripts/ops/bundle.sh +0 -104
  218. package/scripts/ops/chaos.sh +0 -50
  219. package/scripts/ops/chezmoi-apply.sh +0 -333
  220. package/scripts/ops/chezmoi-diff.sh +0 -16
  221. package/scripts/ops/chezmoi-remove.sh +0 -46
  222. package/scripts/ops/chezmoi-update.sh +0 -63
  223. package/scripts/ops/heal-chezmoi.sh +0 -87
  224. package/scripts/ops/heal-system.sh +0 -129
  225. package/scripts/ops/heal-tools.sh +0 -297
  226. package/scripts/ops/heal.sh +0 -223
  227. package/scripts/ops/post-apply-repair.sh +0 -107
  228. package/scripts/ops/prewarm.sh +0 -128
  229. package/scripts/ops/release.sh +0 -262
  230. package/scripts/ops/rollback.sh +0 -604
  231. package/scripts/ops/setup.sh +0 -138
  232. package/scripts/ops/teleport.sh +0 -34
  233. package/scripts/qa/check-version-consistency.sh +0 -124
  234. package/scripts/qa/coverage-baseline.sh +0 -61
  235. package/scripts/qa/docs-coverage.sh +0 -112
  236. package/scripts/qa/examples-coverage.sh +0 -94
  237. package/scripts/qa/powershell-contract.ps1 +0 -95
  238. package/scripts/qa/reliability-audit.sh +0 -139
  239. package/scripts/qa/scorecard-snapshot.sh +0 -128
  240. package/scripts/qa/traceability-coverage.sh +0 -117
  241. package/scripts/qa/validate-examples.sh +0 -27
  242. package/scripts/qa/wsl-contract.sh +0 -12
  243. package/scripts/secrets/age-init.sh +0 -82
  244. package/scripts/secrets/create-secrets-file.sh +0 -46
  245. package/scripts/secrets/encrypt-ssh-key.sh +0 -44
  246. package/scripts/security/backup.sh +0 -58
  247. package/scripts/security/check-disclosure-key-expiry.sh +0 -111
  248. package/scripts/security/dns-doh.sh +0 -52
  249. package/scripts/security/encryption-check.sh +0 -55
  250. package/scripts/security/enforce-policies.sh +0 -335
  251. package/scripts/security/firewall.sh +0 -91
  252. package/scripts/security/lock-configs.sh +0 -67
  253. package/scripts/security/lock-screen.sh +0 -56
  254. package/scripts/security/manage-secrets.sh +0 -429
  255. package/scripts/security/ssh-cert.sh +0 -204
  256. package/scripts/security/telemetry-kill.sh +0 -51
  257. package/scripts/security/usb-safety.sh +0 -52
  258. package/scripts/theme/apply-gnome-theme.sh +0 -333
  259. package/scripts/theme/extract-heic-frames.sh +0 -115
  260. package/scripts/theme/extract-theme.py +0 -742
  261. package/scripts/theme/install-boot-logo.sh +0 -63
  262. package/scripts/theme/install-catppuccin-themes.sh +0 -371
  263. package/scripts/theme/install-cursors.sh +0 -26
  264. package/scripts/theme/install-file-icons.sh +0 -27
  265. package/scripts/theme/install-grub-theme.sh +0 -62
  266. package/scripts/theme/install-lock-icon.sh +0 -31
  267. package/scripts/theme/merge-wallpaper.sh +0 -146
  268. package/scripts/theme/rebuild-themes.sh +0 -544
  269. package/scripts/theme/switch.sh +0 -449
  270. package/scripts/theme/wallpaper-rotate.sh +0 -137
  271. package/scripts/theme/wallpaper-sync.sh +0 -690
  272. package/scripts/tools/cmatrix.sh +0 -22
  273. package/scripts/tools/detect-collisions.py +0 -103
  274. package/scripts/tools/emoji-picker.sh +0 -49
  275. package/scripts/tools/figlet-banner.sh +0 -19
  276. package/scripts/tools/log-rotate.sh +0 -31
  277. package/scripts/tools/lolcat-wrap.sh +0 -20
  278. package/scripts/tools/pipes.sh +0 -49
  279. package/scripts/tuning/linux.sh +0 -186
  280. package/scripts/tuning/macos.sh +0 -56
  281. package/scripts/uninstall.sh +0 -86
  282. package/scripts/version-sync.sh +0 -654
  283. package/templates/chezmoi-data/geekom-a9.toml.example +0 -21
  284. package/templates/chezmoi-data/mac-m1.toml.example +0 -16
  285. package/templates/chezmoi-data/mac-t2-linux.toml.example +0 -21
  286. package/templates/chezmoi-data/surface-pro-7p.toml.example +0 -21
  287. package/templates/projects/go/.github/workflows/ci.yml +0 -31
  288. package/templates/projects/go/README.md +0 -7
  289. package/templates/projects/go/cmd/__PROJECT_NAME__/main.go +0 -8
  290. package/templates/projects/go/go.mod +0 -3
  291. package/templates/projects/go/go.sum +0 -0
  292. package/templates/projects/molecule/README.md +0 -7
  293. package/templates/projects/molecule/converge.yml +0 -7
  294. package/templates/projects/molecule/molecule.yml +0 -16
  295. package/templates/projects/node/.github/workflows/ci.yml +0 -30
  296. package/templates/projects/node/README.md +0 -7
  297. package/templates/projects/node/package-lock.json +0 -12
  298. package/templates/projects/node/package.json +0 -10
  299. package/templates/projects/node/src/index.js +0 -3
  300. package/templates/projects/packer/README.md +0 -15
  301. package/templates/projects/packer/main.pkr.hcl +0 -15
  302. package/templates/projects/python/.github/workflows/ci.yml +0 -34
  303. package/templates/projects/python/README.md +0 -7
  304. package/templates/projects/python/pyproject.toml +0 -25
  305. package/templates/projects/python/src/__PROJECT_NAME__/__init__.py +0 -2
  306. package/templates/projects/python/tests/test_basic.py +0 -3
@@ -1,792 +0,0 @@
1
- ---
2
- render_with_liquid: false
3
- ---
4
-
5
- # WSL2 & Nix Integration Troubleshooting Guide
6
-
7
- ### Metadata
8
-
9
- - **Type:** How-To Guide / Reference
10
- - **Audience:** Intermediate / Advanced
11
- - **Prerequisites:** Basic familiarity with command line, WSL2, and Nix package manager
12
-
13
- ### Content
14
-
15
- A comprehensive troubleshooting guide for WSL2 edge cases, Nix integration issues, and recovery procedures for failed installations.
16
-
17
- ## Table of Contents
18
-
19
- - [WSL2 Edge Cases](#wsl2-edge-cases)
20
- - [Nix Integration Issues](#nix-integration-issues)
21
- - [Recovery Procedures](#recovery-procedures)
22
- - [Performance Optimization](#performance-optimization)
23
- - [Cross-Platform Migration](#cross-platform-migration)
24
- - [Emergency Recovery](#emergency-recovery)
25
-
26
- ---
27
-
28
- ## WSL2 Edge Cases
29
-
30
- ### Filesystem Issues
31
-
32
- #### Problem: Symlinks fail to work between Windows and WSL2
33
-
34
- ```bash
35
- # Check if symlinks are enabled
36
- ls -la ~/.dotfiles/
37
- # Look for broken symlinks (red entries)
38
- ```
39
-
40
- **Root Cause:** Windows filesystem doesn't support Unix symlinks by default.
41
-
42
- **Solutions:**
43
-
44
- 1. **Enable Developer Mode** (Windows 10/11):
45
-
46
- ```powershell
47
- # Run in PowerShell as Administrator
48
- dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
49
- ```
50
-
51
- 2. **Use WSL2 native filesystem**:
52
-
53
- ```bash
54
- # Move dotfiles to WSL2 filesystem
55
- cd ~
56
- git clone https://github.com/sebastienrousseau/dotfiles.git .dotfiles
57
- ```
58
-
59
- 3. **Configure Git for WSL2**:
60
-
61
- ```bash
62
- git config --global core.symlinks true
63
- git config --global core.autocrlf false
64
- ```
65
-
66
- #### Problem: Slow filesystem performance on Windows drives
67
-
68
- ```bash
69
- # Test filesystem performance
70
- time ls -la /mnt/c/Users/
71
- time ls -la ~/
72
- ```
73
-
74
- **Solution:** Always work within WSL2 filesystem (`~/`) for performance-critical operations.
75
-
76
- #### Problem: Permission denied errors on mounted Windows drives
77
-
78
- ```bash
79
- # Check mount options
80
- mount | grep drvfs
81
- ```
82
-
83
- **Solution:** Remount with proper permissions:
84
-
85
- ```bash
86
- # Create /etc/wsl.conf
87
- sudo tee /etc/wsl.conf > /dev/null <<EOF
88
- [automount]
89
- enabled = true
90
- root = /mnt/
91
- options = "metadata,umask=22,fmask=11"
92
- mountFsTab = false
93
- EOF
94
-
95
- # Restart WSL2 from Windows PowerShell
96
- wsl --shutdown
97
- ```
98
-
99
- ### Networking Issues
100
-
101
- #### Problem: DNS resolution fails in WSL2
102
-
103
- ```bash
104
- # Test DNS resolution
105
- nslookup github.com
106
- ping github.com
107
- ```
108
-
109
- **Solutions:**
110
-
111
- 1. **Reset WSL2 DNS**:
112
-
113
- ```bash
114
- sudo rm /etc/resolv.conf
115
- sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'
116
- ```
117
-
118
- 2. **Configure permanent DNS**:
119
-
120
- ```bash
121
- sudo tee /etc/wsl.conf > /dev/null <<EOF
122
-
123
- [network]
124
- generateResolvConf = false
125
- EOF
126
-
127
- sudo tee /etc/resolv.conf > /dev/null <<EOF
128
- nameserver 1.1.1.1
129
- nameserver 8.8.8.8
130
- EOF
131
-
132
- ```
133
-
134
- #### Problem: Port forwarding doesn't work
135
- ```bash
136
- # Check if port is bound
137
- netstat -tulpn | grep :3000
138
- ```
139
-
140
- **Solution:** Use Windows port proxy:
141
-
142
- ```powershell
143
- # Run in PowerShell as Administrator
144
- netsh interface portproxy add v4tov4 listenport=3000 listenaddress=0.0.0.0 connectport=3000 connectaddress=172.x.x.x
145
- ```
146
-
147
- ### Memory and Resource Issues
148
-
149
- #### Problem: WSL2 consumes excessive memory
150
-
151
- ```bash
152
- # Check WSL2 memory usage
153
- cat /proc/meminfo | grep MemTotal
154
- free -h
155
- ```
156
-
157
- **Solution:** Limit WSL2 memory usage:
158
-
159
- ```ini
160
- # Create %UserProfile%\.wslconfig
161
- [wsl2]
162
- memory=8GB
163
- processors=4
164
- swap=2GB
165
- ```
166
-
167
- #### Problem: WSL2 doesn't release memory back to Windows
168
-
169
- **Solution:** Compact WSL2 virtual disk:
170
-
171
- ```powershell
172
- # Run in PowerShell as Administrator
173
- wsl --shutdown
174
- diskpart
175
- # select vdisk file="C:\Users\%USERNAME%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx"
176
- # attach vdisk readonly
177
- # compact vdisk
178
- # detach vdisk
179
- # exit
180
- ```
181
-
182
- ---
183
-
184
- ## Nix Integration Issues
185
-
186
- ### Installation Problems
187
-
188
- #### Problem: Nix installation fails on WSL2
189
-
190
- ```bash
191
- # Check if installation attempted
192
- ls -la /nix/
193
- which nix
194
- ```
195
-
196
- **Solutions:**
197
-
198
- 1. **Use deterministic installer**:
199
-
200
- ```bash
201
- curl -L https://nixos.org/nix/install | sh -s -- --daemon
202
- ```
203
-
204
- 2. **Fix permissions after installation**:
205
-
206
- ```bash
207
- sudo chown -R $(whoami) /nix/var/nix/profiles/per-user/$(whoami)/
208
- sudo chmod -R 755 /nix/var/nix/profiles/per-user/$(whoami)/
209
- ```
210
-
211
- 3. **Enable systemd for Nix daemon** (WSL2 Ubuntu 22.04+):
212
-
213
- ```bash
214
- sudo tee /etc/wsl.conf > /dev/null <<EOF
215
-
216
- [boot]
217
- systemd=true
218
- EOF
219
-
220
- ```
221
-
222
- #### Problem: Nix flakes not recognized
223
- ```bash
224
- # Test flakes support
225
- nix flake --help
226
- ```
227
-
228
- **Solution:** Enable experimental features:
229
-
230
- ```bash
231
- mkdir -p ~/.config/nix/
232
- tee ~/.config/nix/nix.conf > /dev/null <<EOF
233
- experimental-features = nix-command flakes
234
- trusted-users = $(whoami)
235
- EOF
236
-
237
- # Or globally
238
- sudo tee /etc/nix/nix.conf > /dev/null <<EOF
239
- experimental-features = nix-command flakes
240
- trusted-users = @wheel
241
- EOF
242
- ```
243
-
244
- #### Problem: SSL certificate errors during Nix operations
245
-
246
- ```bash
247
- # Test Nix store access
248
- nix ping-store
249
- ```
250
-
251
- **Solutions:**
252
-
253
- 1. **Update CA certificates**:
254
-
255
- ```bash
256
- sudo apt update && sudo apt install ca-certificates
257
- ```
258
-
259
- 2. **Configure Nix with custom CA bundle**:
260
-
261
- ```bash
262
- export NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
263
- echo 'export NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt' >> ~/.bashrc
264
- ```
265
-
266
- ### Flake and Profile Issues
267
-
268
- #### Problem: Flake lock file conflicts
269
-
270
- ```bash
271
- # Check flake lock status
272
- cd ~/.dotfiles/nix/
273
- nix flake check --impure
274
- ```
275
-
276
- **Solution:** Update and rebuild lock file:
277
-
278
- ```bash
279
- cd ~/.dotfiles/nix/
280
- rm flake.lock
281
- nix flake update
282
- nix flake check
283
- ```
284
-
285
- #### Problem: Nix profile conflicts with system packages
286
-
287
- ```bash
288
- # List Nix profiles
289
- nix profile list
290
- # Check which packages are shadowing system ones
291
- which -a git
292
- ```
293
-
294
- **Solutions:**
295
-
296
- 1. **Remove conflicting profiles**:
297
-
298
- ```bash
299
- nix profile remove <profile-number>
300
- ```
301
-
302
- 2. **Use priority settings**:
303
-
304
- ```bash
305
- nix profile install nixpkgs#git --priority 10
306
- ```
307
-
308
- 3. **Create isolated development environments**:
309
-
310
- ```bash
311
- cd ~/.dotfiles/nix/
312
- nix develop
313
- ```
314
-
315
- #### Problem: Nix store corruption
316
-
317
- ```bash
318
- # Check store integrity
319
- nix-store --verify --check-contents
320
- ```
321
-
322
- **Solution:** Repair corrupted store:
323
-
324
- ```bash
325
- # Stop Nix daemon
326
- sudo systemctl stop nix-daemon
327
-
328
- # Repair store
329
- sudo nix-store --verify --check-contents --repair
330
-
331
- # Restart daemon
332
- sudo systemctl start nix-daemon
333
- ```
334
-
335
- ### Build and Cache Issues
336
-
337
- #### Problem: Binary cache not working
338
-
339
- ```bash
340
- # Test cache connectivity
341
- nix ping-store --store https://cache.nixos.org
342
- ```
343
-
344
- **Solution:** Configure trusted substituters:
345
-
346
- ```bash
347
- sudo tee -a /etc/nix/nix.conf > /dev/null <<EOF
348
- substituters = https://cache.nixos.org/ https://nix-community.cachix.org
349
- trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
350
- EOF
351
- ```
352
-
353
- #### Problem: Out of disk space during build
354
-
355
- ```bash
356
- # Check Nix store size
357
- du -sh /nix/store/
358
- df -h /nix/
359
- ```
360
-
361
- **Solution:** Clean up Nix store:
362
-
363
- ```bash
364
- # Remove unused packages
365
- nix-collect-garbage
366
-
367
- # Deep cleanup (removes old generations)
368
- nix-collect-garbage -d
369
-
370
- # Optimize store (hard link identical files)
371
- nix-store --optimise
372
- ```
373
-
374
- ---
375
-
376
- ## Recovery Procedures
377
-
378
- ### Complete System Recovery
379
-
380
- #### Scenario: Dotfiles installation completely broken
381
-
382
- ```bash
383
- # 1. Backup current state
384
- cp ~/.zshrc ~/.zshrc.backup.$(date +%s)
385
- cp ~/.bashrc ~/.bashrc.backup.$(date +%s)
386
-
387
- # 2. Reset to minimal shell
388
- export PATH=/usr/bin:/bin
389
- unset ZDOTDIR
390
-
391
- # 3. Clean chezmoi state
392
- rm -rf ~/.local/share/chezmoi/
393
- rm -rf ~/.config/chezmoi/
394
-
395
- # 4. Reinstall from scratch
396
- cd /tmp
397
- curl -fsSL https://raw.githubusercontent.com/sebastienrousseau/dotfiles/main/install.sh | bash
398
- ```
399
-
400
- #### Scenario: WSL2 completely broken
401
-
402
- ```powershell
403
- # From Windows PowerShell as Administrator
404
-
405
- # 1. Export current installation (backup)
406
- wsl --export Ubuntu Ubuntu-backup.tar
407
-
408
- # 2. Unregister broken installation
409
- wsl --unregister Ubuntu
410
-
411
- # 3. Reinstall from Microsoft Store or import backup
412
- wsl --import Ubuntu C:\WSL\Ubuntu Ubuntu-backup.tar
413
-
414
- # 4. Reinstall dotfiles
415
- wsl -d Ubuntu -u root -- curl -fsSL https://raw.githubusercontent.com/sebastienrousseau/dotfiles/main/install.sh | bash
416
- ```
417
-
418
- ### Partial Recovery
419
-
420
- #### Fix broken Nix installation
421
-
422
- ```bash
423
- # 1. Remove broken Nix
424
- sudo rm -rf /nix/
425
- sudo userdel -r nix-daemon 2>/dev/null || true
426
- sudo groupdel nixbld 2>/dev/null || true
427
-
428
- # 2. Clean environment
429
- unset NIX_PATH
430
- unset NIX_PROFILES
431
- unset NIX_SSL_CERT_FILE
432
-
433
- # 3. Reinstall Nix
434
- curl -L https://nixos.org/nix/install | sh
435
-
436
- # 4. Restart shell and test
437
- exec zsh
438
- which nix
439
- ```
440
-
441
- #### Fix broken shell configuration
442
-
443
- ```bash
444
- # 1. Use emergency shell config
445
- cat > ~/.zshrc.emergency <<'EOF'
446
- export PATH=/usr/bin:/bin:/usr/sbin:/sbin
447
- export SHELL=/bin/zsh
448
- alias ll='ls -la'
449
- alias la='ls -la'
450
- PS1='%n@%m:%~$ '
451
- EOF
452
-
453
- # 2. Test emergency config
454
- zsh -c 'source ~/.zshrc.emergency && echo "Emergency config works"'
455
-
456
- # 3. Gradually restore
457
- mv ~/.zshrc ~/.zshrc.broken
458
- ln -s ~/.zshrc.emergency ~/.zshrc
459
-
460
- # 4. Reinstall dotfiles piece by piece
461
- cd ~/.dotfiles
462
- chezmoi init --force
463
- chezmoi apply --dry-run
464
- chezmoi apply
465
- ```
466
-
467
- ### Data Recovery
468
-
469
- #### Recover encrypted secrets
470
-
471
- ```bash
472
- # 1. Check if key file exists
473
- ls -la ~/.config/chezmoi/key.txt
474
-
475
- # 2. If missing, try to recover from backup locations
476
- find / -name "key.txt" -type f 2>/dev/null
477
- find /mnt/c/ -name "*.key" -type f 2>/dev/null
478
-
479
- # 3. Test key validity
480
- age -d -i ~/.config/chezmoi/key.txt ~/.local/share/chezmoi/encrypted_file.age
481
-
482
- # 4. If key is lost, regenerate encrypted files
483
- chezmoi execute-template --init --force
484
- ```
485
-
486
- #### Recover Git configuration
487
-
488
- ```bash
489
- # 1. Check current git config
490
- git config --list --show-origin
491
-
492
- # 2. Backup current config
493
- cp ~/.gitconfig ~/.gitconfig.backup.$(date +%s)
494
-
495
- # 3. Restore from dotfiles
496
- chezmoi apply --include='**/dot_gitconfig*'
497
-
498
- # 4. Verify critical settings
499
- git config --get user.name
500
- git config --get user.email
501
- git config --get core.editor
502
- ```
503
-
504
- ---
505
-
506
- ## Performance Optimization
507
-
508
- ### WSL2 Performance Tuning
509
-
510
- #### Optimize filesystem performance
511
-
512
- ```bash
513
- # 1. Move frequently accessed files to WSL2 filesystem
514
- mkdir -p ~/workspace
515
- ln -s ~/workspace ~/workspace
516
-
517
- # 2. Configure Git for performance
518
- git config --global core.preloadindex true
519
- git config --global core.fscache true
520
- git config --global gc.auto 256
521
-
522
- # 3. Use native WSL2 paths in tools
523
- export BROWSER="/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
524
- export EDITOR="nvim"
525
- ```
526
-
527
- #### Reduce memory usage
528
-
529
- ```bash
530
- # 1. Limit shell history
531
- echo 'HISTSIZE=1000' >> ~/.zshrc
532
- echo 'SAVEHIST=1000' >> ~/.zshrc
533
-
534
- # 2. Disable unnecessary services
535
- sudo systemctl disable apache2 2>/dev/null || true
536
- sudo systemctl disable mysql 2>/dev/null || true
537
-
538
- # 3. Configure swap usage
539
- echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
540
- ```
541
-
542
- ### Nix Performance Tuning
543
-
544
- #### Optimize Nix builds
545
-
546
- ```bash
547
- # Configure build settings
548
- sudo tee -a /etc/nix/nix.conf > /dev/null <<EOF
549
- max-jobs = auto
550
- cores = 0
551
- sandbox = true
552
- substituters = https://cache.nixos.org/ https://nix-community.cachix.org
553
- trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
554
- EOF
555
- ```
556
-
557
- #### Enable build caching
558
-
559
- ```bash
560
- # Install and configure cachix
561
- nix profile install nixpkgs#cachix
562
- cachix use nix-community
563
-
564
- # Add to shell config
565
- echo 'eval "$(cachix completion bash)"' >> ~/.bashrc
566
- ```
567
-
568
- ---
569
-
570
- ## Cross-Platform Migration
571
-
572
- ### Moving from macOS to WSL2
573
-
574
- #### Environment differences checklist
575
-
576
- ```bash
577
- # 1. Check path differences
578
- echo $PATH | tr ':' '\n' | sort
579
-
580
- # 2. Check shell differences
581
- echo $SHELL
582
- zsh --version
583
-
584
- # 3. Check package managers
585
- which brew 2>/dev/null && echo "Homebrew found"
586
- which apt 2>/dev/null && echo "APT found"
587
- which nix 2>/dev/null && echo "Nix found"
588
- ```
589
-
590
- #### Migration procedure
591
-
592
- ```bash
593
- # 1. Export current configuration
594
- cd ~/.dotfiles
595
- chezmoi archive --format=tar | gzip > dotfiles-backup.tar.gz
596
-
597
- # 2. Transfer to WSL2 (from Windows side)
598
- # Copy dotfiles-backup.tar.gz to Windows, then:
599
- # cp /mnt/c/Users/username/Downloads/dotfiles-backup.tar.gz ./
600
-
601
- # 3. Import on WSL2
602
- tar -xzf dotfiles-backup.tar.gz
603
- cd ~/.dotfiles
604
- git remote update
605
- git pull origin main
606
-
607
- # 4. Platform-specific adjustments
608
- chezmoi apply --dry-run
609
- chezmoi apply
610
- ```
611
-
612
- ### Moving from Linux to WSL2
613
-
614
- #### Handle systemd differences
615
-
616
- ```bash
617
- # Check systemd status
618
- systemctl is-system-running 2>/dev/null || echo "systemd not available"
619
-
620
- # Alternative service management for WSL2
621
- sudo service ssh start # Instead of systemctl start ssh
622
- ```
623
-
624
- #### Network configuration migration
625
-
626
- ```bash
627
- # 1. Export network settings from source system
628
- ip route show > network-config.txt
629
- cat /etc/resolv.conf >> network-config.txt
630
-
631
- # 2. Adapt for WSL2
632
- # (WSL2 handles most networking automatically)
633
- ```
634
-
635
- ---
636
-
637
- ## Emergency Recovery
638
-
639
- ### Emergency Shell Access
640
-
641
- #### If shell is completely broken
642
-
643
- ```bash
644
- # 1. Access via different shell
645
- /bin/bash --noprofile --norc
646
-
647
- # 2. Or use emergency profile
648
- export PATH=/usr/bin:/bin
649
- export PS1="EMERGENCY $ "
650
- export SHELL=/bin/bash
651
-
652
- # 3. Fix basic functionality
653
- alias ls='ls --color=auto'
654
- alias ll='ls -la'
655
- ```
656
-
657
- #### If WSL2 won't start
658
-
659
- ```powershell
660
- # From Windows PowerShell as Administrator
661
-
662
- # 1. Check WSL2 status
663
- wsl --status
664
-
665
- # 2. Restart WSL2 service
666
- net stop LxssManager
667
- net start LxssManager
668
-
669
- # 3. If that fails, restart Docker Desktop (if installed)
670
- # Then restart WSL2
671
-
672
- # 4. Last resort: restart Windows
673
- ```
674
-
675
- ### Emergency Contacts and Resources
676
-
677
- #### Diagnostic commands for support requests
678
-
679
- ```bash
680
- # System information
681
- cat /etc/os-release
682
- uname -a
683
- wsl.exe --version 2>/dev/null || echo "Not in WSL2"
684
-
685
- # Nix information
686
- nix --version 2>/dev/null || echo "Nix not installed"
687
- nix-env --version 2>/dev/null || echo "nix-env not available"
688
-
689
- # Dotfiles information
690
- cd ~/.dotfiles && git log --oneline -5
691
- chezmoi --version 2>/dev/null || echo "Chezmoi not installed"
692
-
693
- # Generate diagnostic report
694
- cat > ~/diagnostic-report.txt <<EOF
695
- Date: $(date)
696
- User: $(whoami)
697
- Shell: $SHELL
698
- OS: $(cat /etc/os-release | grep PRETTY_NAME)
699
- Kernel: $(uname -r)
700
- WSL Version: $(wsl.exe --version 2>/dev/null || echo "Not in WSL2")
701
- Nix Version: $(nix --version 2>/dev/null || echo "Not installed")
702
- Chezmoi Version: $(chezmoi --version 2>/dev/null || echo "Not installed")
703
-
704
- Recent Git Commits:
705
- $(cd ~/.dotfiles && git log --oneline -5 2>/dev/null || echo "Git not available")
706
-
707
- Current PATH:
708
- $(echo $PATH | tr ':' '\n' | nl)
709
-
710
- Nix Profiles:
711
- $(nix profile list 2>/dev/null || echo "Nix profiles not available")
712
-
713
- WSL Mount Points:
714
- $(mount | grep drvfs || echo "No Windows mounts")
715
- EOF
716
-
717
- echo "Diagnostic report saved to ~/diagnostic-report.txt"
718
- ```
719
-
720
- #### Support channels
721
-
722
- - GitHub Issues: [Repository Issues](https://github.com/sebastienrousseau/dotfiles/issues)
723
- - WSL2 Documentation: [Microsoft WSL Docs](https://docs.microsoft.com/en-us/windows/wsl/)
724
- - Nix Documentation: [Nix Manual](https://nixos.org/manual/nix/stable/)
725
- - Community Support: Stack Overflow, NixOS Discourse
726
-
727
- ---
728
-
729
- ## Quick Reference
730
-
731
- ### Essential Commands
732
-
733
- ```bash
734
- # System status
735
- dot doctor # Run dotfiles health check
736
- wsl --status # WSL2 status
737
- nix profile list # List Nix packages
738
- chezmoi status # Chezmoi status
739
-
740
- # Quick fixes
741
- chezmoi apply # Reapply dotfiles
742
- source ~/.zshrc # Reload shell config
743
- nix-collect-garbage # Clean Nix store
744
- sudo systemctl restart nix-daemon # Restart Nix daemon
745
-
746
- # Emergency access
747
- /bin/bash --noprofile # Clean shell
748
- export PATH=/usr/bin:/bin # Minimal PATH
749
- ```
750
-
751
- ### Recovery Commands
752
-
753
- ```bash
754
- # Nuclear options (use with caution)
755
- rm -rf ~/.local/share/chezmoi/ # Reset chezmoi
756
- sudo rm -rf /nix/ # Remove Nix completely
757
- wsl --unregister Ubuntu # Reset WSL2 (from PowerShell)
758
- ```
759
-
760
- This guide covers the most common WSL2 and Nix edge cases. For issues not covered here, refer to the specific tool documentation or create a support request with the diagnostic information provided.
761
-
762
- ### Validation Checklist
763
-
764
- Before reporting issues, verify your environment with these commands:
765
-
766
- ```bash
767
- # WSL2 Environment Check
768
- echo "=== WSL2 Environment Check ==="
769
- uname -a
770
- cat /proc/version | grep -i wsl || echo "Not running in WSL2"
771
- mount | grep drvfs | head -3
772
- df -h / /tmp
773
-
774
- # Nix Installation Check
775
- echo "=== Nix Installation Check ==="
776
- command -v nix && nix --version || echo "Nix not installed"
777
- echo $NIX_PATH
778
- ls -la ~/.config/nix/ 2>/dev/null || echo "No Nix config directory"
779
-
780
- # Dotfiles Status Check
781
- echo "=== Dotfiles Status Check ==="
782
- command -v chezmoi && chezmoi --version || echo "Chezmoi not installed"
783
- cd ~/.dotfiles && git status --porcelain || echo "Not in dotfiles directory"
784
- ls -la ~/.dotfiles/nix/flake.nix 2>/dev/null || echo "Nix flake not found"
785
-
786
- # Performance Check
787
- echo "=== Performance Check ==="
788
- time ls ~/.dotfiles >/dev/null
789
- free -m 2>/dev/null || vm_stat | head -5
790
- ```
791
-
792
- Run this checklist and include the output when requesting support.