fix: 更新仓库 URL 和路径为 nix-config
This commit is contained in:
@@ -18,7 +18,7 @@ wsl -d NixOS
|
|||||||
2. 运行安装脚本:
|
2. 运行安装脚本:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash <(curl -fsSL https://git.furtherverse.com/imbytecat/archlinux-config/raw/branch/nixos/scripts/install.sh)
|
bash <(curl -fsSL https://git.furtherverse.com/imbytecat/nix-config/raw/branch/main/scripts/install.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
3. 重新登录,配置 Git 身份:
|
3. 重新登录,配置 Git 身份:
|
||||||
@@ -34,13 +34,13 @@ git config --global user.email "你的邮箱"
|
|||||||
2. 运行安装脚本(传入 `bare` 参数):
|
2. 运行安装脚本(传入 `bare` 参数):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash <(curl -fsSL https://git.furtherverse.com/imbytecat/archlinux-config/raw/branch/nixos/scripts/install.sh) bare
|
bash <(curl -fsSL https://git.furtherverse.com/imbytecat/nix-config/raw/branch/main/scripts/install.sh) bare
|
||||||
```
|
```
|
||||||
|
|
||||||
3. 生成硬件配置并重新应用:
|
3. 生成硬件配置并重新应用:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~/.config/nixos-config
|
cd ~/.config/nix-config
|
||||||
sudo nixos-generate-config --show-hardware-config > hosts/bare/hardware-configuration.nix
|
sudo nixos-generate-config --show-hardware-config > hosts/bare/hardware-configuration.nix
|
||||||
# 取消 hosts/bare/default.nix 中 imports 的注释
|
# 取消 hosts/bare/default.nix 中 imports 的注释
|
||||||
sudo nixos-rebuild switch --flake .#bare
|
sudo nixos-rebuild switch --flake .#bare
|
||||||
@@ -72,7 +72,7 @@ sudo nixos-rebuild switch --flake .#bare
|
|||||||
## 日常使用
|
## 日常使用
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~/.config/nixos-config
|
cd ~/.config/nix-config
|
||||||
|
|
||||||
# 更新配置
|
# 更新配置
|
||||||
git pull && sudo nixos-rebuild switch --flake .#wsl
|
git pull && sudo nixos-rebuild switch --flake .#wsl
|
||||||
|
|||||||
+3
-3
@@ -3,8 +3,8 @@
|
|||||||
# 在 NixOS-WSL 或裸机 NixOS 中运行
|
# 在 NixOS-WSL 或裸机 NixOS 中运行
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
REPO_URL="https://git.furtherverse.com/imbytecat/archlinux-config.git"
|
REPO_URL="https://git.furtherverse.com/imbytecat/nix-config.git"
|
||||||
CONFIG_DIR="$HOME/.config/nixos-config"
|
CONFIG_DIR="$HOME/.config/nix-config"
|
||||||
FLAKE_TARGET="${1:-wsl}" # 默认 wsl,裸机传入 bare
|
FLAKE_TARGET="${1:-wsl}" # 默认 wsl,裸机传入 bare
|
||||||
|
|
||||||
echo "📥 获取配置仓库..."
|
echo "📥 获取配置仓库..."
|
||||||
@@ -12,7 +12,7 @@ if [[ -d "$CONFIG_DIR/.git" ]]; then
|
|||||||
echo "⏩ 仓库已存在,拉取最新..."
|
echo "⏩ 仓库已存在,拉取最新..."
|
||||||
git -C "$CONFIG_DIR" pull
|
git -C "$CONFIG_DIR" pull
|
||||||
else
|
else
|
||||||
git clone -b nixos "$REPO_URL" "$CONFIG_DIR"
|
git clone "$REPO_URL" "$CONFIG_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "⚙️ 应用系统配置(目标: $FLAKE_TARGET)..."
|
echo "⚙️ 应用系统配置(目标: $FLAKE_TARGET)..."
|
||||||
|
|||||||
Reference in New Issue
Block a user