Skip to content

zeinsshiri1984/ApexDotfiles

Repository files navigation

ApexDotfiles

GPLv3 License

  1. 一套追求效率与简洁的开发环境配置。
  2. 面向debian系(wsl-Ubuntu,Pop_os在我机器上实测没问题)
  3. 计划支持RHEL系

环境方案

最小化系统环境:

  1. Host OS随时可丢弃;仅作为Linux 内核 + 用户态容器宿主;bootstrap脚本仅部署启动级/逃生级工具
  2. rootless podman优先,兼容docker命令和docker compose脚本
  3. 虽然不是真正的immutable os, 但baes os尽量自律式不可写

可快速恢复的用户态环境:

  1. 用户态包管理器规避FHS路径造成的依赖冲突: 使用Linuxbrew管理cli工具(但有些强依赖运行时的工具只有语言包管理器分发途径),flatpak管理GUI工具,mise管理开发工具链;所有工具都是声明式管理的,一条命令快速部署/恢复
  2. 脚本shell bash + 交互shell nushell: ~/.profile 为环境事实源; bash作为默认登录shell; 由交互式bash启动nushell, 达成了两shell共用一套环境的目的
bash login
  → ~/.profile
  → ~/.bashrc
     → exec nu (直接切 Nushell)
  1. 遵循XDG规范
  2. 开箱即用的zellij + yazi + helix + lazygit + podman-tui + btop + claude code基础开发环境
  3. 交互增强: starship + Carapace-bin
  4. ~/just/下编写了大量日常维护命令

工具链和依赖可复现的项目环境

  1. 项目不依赖FHS硬编码动态包:

工具链复现: mise安装工具链+工具链版本按路径隔离

依赖复现: 语言原生包管理器

  1. 项目依赖FHS硬编码动态包:

工具链复现: mise安装工具链+工具链版本按路径隔离

非FHS路径依赖复现: 语言原生包管理器

FHS硬编码路径依赖复现: distrobox

Screenshots

Installation(无代理环境,可在链接前添加https://ghfast.top/ 前缀)

代理环境应该自己准备好, 国内网络环境真没辙

进入bash环境后执行以下命令

1.执行 bootstrap_host.sh

curl -fsSL https://raw.githubusercontent.com/zeinsshiri1984/ApexDotfiles/main/scripts/bootstrap_host.sh | bash

2.执行 bootstrap_user.sh

curl -fsSL https://raw.githubusercontent.com/zeinsshiri1984/ApexDotfiles/main/scripts/bootstrap_user.sh | bash

执行到此会自动重启login shell使配置生效, 若配置未生效导致找不到包管理器, 则手动重启发行版

3.初次部署(可重复部署)

chezmoi cd
just brew
just gh
just mise
curl -fsSL https://raw.githubusercontent.com/zeinsshiri1984/ApexDotfiles/main/scripts/dev_tool.sh | bash
# 不需要运维工具别执行以下行
curl -fsSL https://raw.githubusercontent.com/zeinsshiri1984/ApexDotfiles/main/scripts/ops_tool.sh | bash
# 没GUI别执行以下行(如服务器环境)
just flatpak-bootstrap  

4.后续项目更新

chezmoi cd
chezmoi update
just usr

快速上手常用工具

运行以下命令快速上手

just helix-tips
just flatpak-tips
just zellij-tips
just gtrash-tips
just chezmoi-tips
just mise-tips
just gh-tips

# 工作流
y              # 终端中打开文件管理器yazi
yz             # zellij中打开文件管理器yazi用这个命令; 主要是zellij中yazi有兼容性问题, 两个命令用的是两套配置

z -s <项目名>   # 开启一个zellij项目会话
z a <项目名>    # 链接已存在zellij项目会话
z ls           # 查看已存在会话

cc-switch       # 给claudecode配置第三方模型
cc              # 打开claudecode, nu环境下务必用这个命令打开, 避免潜在兼容性问题 

Acknowledgements

About

A development environment configuration that pursues efficiency and simplicity

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages