Commit 2c47a09

HPCesia <me@hpcesia.com>
2025-07-15 15:59:09
docs: update README
1 parent 1d7e17e
README.md
@@ -2,27 +2,49 @@
 
 English | [简体中文](./README.zh-CN.md)
 
-My Nix configuration for a NixOS laptop.
+My Nix configuration for a NixOS laptop and a NixOS VPS.
 
 ## Component List
 
-|                             | NixOS                                              |
-| --------------------------- | -------------------------------------------------- |
-| **Desktop**                 | [KDE Plasma 6][kde-plasma]                         |
-| **Terminal Emulator**       | [Ghostty][ghostty] + [WezTerm][wezterm]            |
-| **Terminal Multiplexer**    | [Zellij][zellij]                                   |
-| **Shell**                   | [Nushell][nushell] + [Starship][starship]          |
-| **Input Method**            | [Fcitx5][fcitx5] + [Rime][rime]                    |
-| **Color Theme**             | [Catppuccin][catppuccin]                           |
-| **File Manager**            | [Yazi][yazi] + [Dolphin][kde-dolphin]              |
-| **Development Environment** | [VSCode][vscode] + [Helix][helix]                  |
-| **Browser**                 | [Firefox][firefox] + [Chromium][chromium] (backup) |
+|                             | NixOS                                                        |
+| --------------------------- | ------------------------------------------------------------ |
+| **Desktop**                 | [KDE Plasma 6][kde-plasma]                                   |
+| **Terminal Emulator**       | [WezTerm][wezterm] + [Ghostty][ghostty]                      |
+| **Terminal Multiplexer**    | [Zellij][zellij]                                             |
+| **Shell**                   | [Nushell][nushell] + [Starship][starship]                    |
+| **Input Method**            | [Fcitx5][fcitx5] + [Rime][rime]                              |
+| **Color Theme**             | [Catppuccin Macchiato][catppuccin]                           |
+| **File Manager**            | [Yazi][yazi] + [Dolphin][kde-dolphin]                        |
+| **Development Environment** | [VSCode][vscode] + [Helix][helix] (with [Zide][zide])        |
+| **Browser**                 | [Firefox][firefox] + [Chromium][chromium] (backup)           |
+| **Secret Management**       | [sops-nix][sops-nix], see [`./secrets`](./secrets/README.md) |
+
+## Deployment
+
+> [!WARNING]
+> You should not deploy this configuration directly on your host, as it contains secrets that only I can decrypt and use.
+>
+> This configuration includes some hardcoded absolute paths and should be placed in the home directory at `~/nix-config`.
+
+### For Local NixOS
+
+```bash
+sudo nixos-rebuild switch --flake .#kevin
+```
+
+### For Remote NixOS
+
+```bash
+colmena apply
+```
 
 ## Acknowledgments
 
 - Nix Flakes
   - [ryan4yin/nix-config](https://github.com/ryan4yin/nix-config): The foundational architecture of this configuration originates from here.
   - [kamadorueda/machine](https://github.com/kamadorueda/machine): Resolves the issue with writing to VSCode's `settings.json`.
+- Dotfiles
+  - [yyhhyyyyyy/selfproxy](https://github.com/yyhhyyyyyy/selfproxy): Referenced configurations for [mihomo][mihomo].
 
 <!-- Link List -->
 
@@ -35,9 +57,12 @@ My Nix configuration for a NixOS laptop.
 [helix]: https://github.com/helix-editor/helix
 [kde-dolphin]: https://invent.kde.org/system/dolphin
 [kde-plasma]: https://invent.kde.org/plasma/plasma-desktop
+[mihomo]: https://github.com/MetaCubeX/mihomo
 [rime]: https://github.com/rime/librime
 [starship]: https://github.com/starship/starship
+[sops-nix]: https://github.com/Mic92/sops-nix
 [wezterm]: https://github.com/wezterm/wezterm
 [vscode]: https://github.com/microsoft/vscode
 [yazi]: https://github.com/sxyazi/yazi
 [zellij]: https://github.com/iXialumy/zellij
+[zide]: https://github.com/josephschmitt/zide
README.zh-CN.md
@@ -2,27 +2,49 @@
 
 [English](./README.md) | 简体中文
 
-我的 Nix 配置,用于一台 NixOS 笔记本。
+我的 Nix 配置,用于一台 NixOS 笔记本和一台 NixOS VPS。
 
 ## 组件列表
 
-|                | NixOS                                              |
-| -------------- | -------------------------------------------------- |
-| **桌面**       | [KDE Plasma 6][kde-plasma]                         |
-| **终端模拟器** | [Ghostty][ghostty] + [WezTerm][wezterm]            |
-| **终端复用器** | [Zellij][zellij]                                   |
-| **Shell**      | [Nushell][nushell] + [Starship][starship]          |
-| **输入法**     | [Fcitx5][fcitx5] + [Rime][rime]                    |
-| **配色主题**   | [Catppuccin][catppuccin]                           |
-| **文件管理**   | [Yazi][yazi] + [Dolphin][kde-dolphin]              |
-| **开发环境**   | [VSCode][vscode] + [Helix][helix]                  |
-| **浏览器**     | [Firefox][firefox] + [Chromium][chromium] (backup) |
+|                | NixOS                                                               |
+| -------------- | ------------------------------------------------------------------- |
+| **桌面**       | [KDE Plasma 6][kde-plasma]                                          |
+| **终端模拟器** | [WezTerm][wezterm] + [Ghostty][ghostty]                             |
+| **终端复用器** | [Zellij][zellij]                                                    |
+| **Shell**      | [Nushell][nushell] + [Starship][starship]                           |
+| **输入法**     | [Fcitx5][fcitx5] + [Rime][rime]                                     |
+| **配色主题**   | [Catppuccin Macchiato][catppuccin]                                  |
+| **文件管理**   | [Yazi][yazi] + [Dolphin][kde-dolphin]                               |
+| **开发环境**   | [VSCode][vscode] + [Helix][helix] (with [Zide][zide])               |
+| **浏览器**     | [Firefox][firefox] + [Chromium][chromium] (backup)                  |
+| **机密管理**   | [sops-nix][sops-nix],详见 [`./secrets`](./secrets/README.zh-CN.md) |
+
+## 部署
+
+> [!WARNING]
+> 你不应该在你的主机上直接部署本配置,这个配置包含只有我自己可以解密使用的机密。
+>
+> 这个配置包含部分硬编码的绝对路径,应当放在主用户的 `~/nix-config` 中。
+
+### 对于本地 NixOS
+
+```bash
+sudo nixos-rebuild switch --flake .#kevin
+```
+
+### 对于远程 NixOS
+
+```bash
+colmena apply
+```
 
 ## 致谢
 
 - Nix Flakes
   - [ryan4yin/nix-config](https://github.com/ryan4yin/nix-config): 本配置的基础架构源自此配置。
   - [kamadorueda/machine](https://github.com/kamadorueda/machine): 解决 VSCode 的 `settings.json` 写入问题。
+- Dotfiles
+  - [yyhhyyyyyy/selfproxy](https://github.com/yyhhyyyyyy/selfproxy): 参考了 [mihomo][mihomo] 的相关配置。
 
 <!-- 链接列表 -->
 
@@ -35,9 +57,12 @@
 [helix]: https://github.com/helix-editor/helix
 [kde-dolphin]: https://invent.kde.org/system/dolphin
 [kde-plasma]: https://invent.kde.org/plasma/plasma-desktop
+[mihomo]: https://github.com/MetaCubeX/mihomo
 [rime]: https://github.com/rime/librime
 [starship]: https://github.com/starship/starship
+[sops-nix]: https://github.com/Mic92/sops-nix
 [wezterm]: https://github.com/wezterm/wezterm
 [vscode]: https://github.com/microsoft/vscode
 [yazi]: https://github.com/sxyazi/yazi
 [zellij]: https://github.com/iXialumy/zellij
+[zide]: https://github.com/josephschmitt/zide