Files
t-packs/README.md
2025-10-09 16:55:49 +08:00

116 lines
2.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# T-Packs T 老师精选软件
T-Packs 是一个使用 Nix 构建系统管理的精选软件包集合,旨在提供高质量、实用的开发工具和实用程序。
## 🚀 项目特点
- 使用 Nix Flakes 管理依赖和构建过程
- 包含精选的开发工具和实用程序
- 提供统一的配置和安装方式
- 支持 NixOS 模块集成
## 📦 包含的软件包
### ut - 开发者工具盒
`ut` 是一个基于 Rust 开发的开发者工具盒,灵感来自 [it-tools.tech](https://it-tools.tech)。
- 轻量级、高性能的命令行工具
- 提供多种实用功能
- 开源 (MIT 许可证)
## 🛠️ 快速开始
### 前提条件
确保您已安装 Nix 包管理器,并启用了 Flakes 支持。
### 使用方法
#### 作为依赖引入
在您的 flake.nix 中添加:
```nix
{ inputs.t-packs.url = "github:your-username/t-packs";
outputs = { self, nixpkgs, t-packs }: {
# 使用 t-packs 中的包
yourPackage = t-packs.packages.${system}.com.github.ksdme.ut;
};
}
```
#### 在 NixOS 中使用
在您的 NixOS 配置中导入模块:
```nix
{ config, pkgs, ... }:
{
imports = [
t-packs.nixosModules.default
];
# 配置相关服务
}
```
#### 开发环境
进入开发环境:
```bash
nix develop
```
这将提供以下开发工具:
- `tokei` - 代码统计工具
- `nil` - Nix 语言服务器
## 📋 项目结构
```
├── com/ # 软件包定义
│ └── github/ # GitHub 来源的包
│ └── ksdme/ # 作者 ksdme 的包
│ └── ut/ # ut 工具包
├── default.nix # 默认包定义
├── flake.nix # Flake 配置
├── flake.lock # 依赖锁定文件
├── treefmt.nix # 代码格式化配置
└── README.md # 项目说明文档
```
## 📝 开发指南
### 格式化代码
使用 treefmt 格式化项目代码:
```bash
nix fmt
```
### 添加新软件包
1. 在适当的目录下创建新的 Nix 文件
2. 在 default.nix 或 flake.nix 中添加相应的导入和配置
3. 运行 `nix flake update` 更新依赖
## 📄 许可证
[MIT License](LICENSE)
## 👨‍🏫 关于 T 老师
T 老师精选软件 (T-Packs) 是由 T 老师精心挑选和维护的实用软件集合,旨在为开发者提供高质量、易于使用的工具。
## 🤝 贡献指南
欢迎提交 Issue 和 Pull Request 来改进这个项目!
---
*使用 Nix让软件管理更简单*