refactor(modules): 添加类型注解并优化 WSL 检测

- 全模块补全类型注解 (files, after_update, on_change)
- docker: 仅在 WSL 环境禁用 networkd-wait-online
- docker: 添加 _is_wsl() 自动检测函数
- zsh/docker: 改进错误输出使用 decman.error
- wsl-init: 统一使用 [[ ]] 并格式化代码
This commit is contained in:
2026-04-09 12:09:00 +08:00
parent 4182b3c300
commit b96e144e82
6 changed files with 54 additions and 35 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ class BaseModule(Module):
super().__init__("base")
self.user = user
def files(self):
def files(self) -> dict[str, File]:
return {
"/etc/pacman.conf": File(
source_file="./system/etc/pacman.conf",