refactor: 重构为多平台多用户架构,全面提升终端体验

- 新增 lib/ 辅助函数(mkNixos/mkDarwin/mkHome),消除硬编码
- 拆分 modules/ 为 nixos/darwin/shared 三层,支持跨平台共享
- 重构 home/ 为 shell/dev/theme 子模块,工具全部迁入用户级
- 深度配置 Tmux/FZF/Atuin/Bat/Eza/Btop/Lazygit/Starship
- 添加 Catppuccin Mocha 统一主题、Nerd Fonts 声明式管理
- 新增 homeConfigurations 输出,支持非 NixOS 系统直装
- 新增 nix-darwin 输入,预留 macOS 扩展路径
- 新增 overlays/ 和 pkgs/ 自定义包基础设施
- 修正 nix-darwin URL(LnL7 → nix-darwin org)
This commit is contained in:
2026-04-03 19:54:17 +08:00
parent 92c6535945
commit e92c7aee31
31 changed files with 827 additions and 391 deletions
+85
View File
@@ -0,0 +1,85 @@
{ lib, ... }:
{
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = false;
format = lib.concatStrings [
"$os"
"$username"
"$hostname"
"$directory"
"$git_branch"
"$git_status"
"$nix_shell"
"$nodejs"
"$python"
"$go"
"$rust"
"$docker_context"
"$cmd_duration"
"$line_break"
"$character"
];
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
os = {
disabled = false;
symbols = {
NixOS = " ";
Linux = " ";
Macos = " ";
Windows = "󰖳 ";
};
};
directory = {
truncation_length = 3;
truncation_symbol = "/";
substitutions = {
Developer = " ";
Documents = "󰈙 ";
Downloads = " ";
};
};
git_branch.symbol = " ";
git_status = {
format = "([\\[$all_status$ahead_behind\\]]($style) )";
};
nix_shell = {
symbol = " ";
format = "[$symbol$state( \\($name\\))]($style) ";
};
docker_context = {
symbol = " ";
format = "[$symbol$context]($style) ";
};
cmd_duration = {
min_time = 2000;
format = "[$duration]($style) ";
};
nodejs = {
format = "[$symbol($version)]($style) ";
detect_extensions = [ ];
};
python.format = "[$symbol($version)]($style) ";
go.format = "[$symbol($version)]($style) ";
rust.format = "[$symbol($version)]($style) ";
};
};
}