refactor: 拆分 cli 模块,分离现代终端工具与开发工具链

- 新增 cli 模块:bat, btop, duf, dust, eza, fastfetch, fd,
  git-delta, jq, micro, procs, ripgrep, tealdeer, trash-cli,
  yazi, zoxide + git/mise 用户配置
- dev 瘦身为纯开发工具:语言运行时、LSP、编辑器
- base 还原为无参构造,移除用户配置文件职责
- git config 添加 delta pager 配置
This commit is contained in:
2026-04-02 20:24:23 +08:00
parent c58276b18b
commit 339a27d736
5 changed files with 55 additions and 25 deletions
+41
View File
@@ -0,0 +1,41 @@
from decman import File, Module
from decman.plugins.pacman import packages as pacman_packages
class CliModule(Module):
def __init__(self, user: str):
super().__init__("cli")
self.user = user
def files(self):
return {
f"/home/{self.user}/.config/git/config": File(
source_file="./home/.config/git/config",
owner=self.user,
),
f"/home/{self.user}/.config/mise/config.toml": File(
source_file="./home/.config/mise/config.toml",
owner=self.user,
),
}
@pacman_packages
def pacman_packages(self) -> set[str]:
return {
"bat",
"btop",
"duf",
"dust",
"eza",
"fastfetch",
"fd",
"git-delta",
"jq",
"micro",
"procs",
"ripgrep",
"tealdeer",
"trash-cli",
"yazi",
"zoxide",
}