modified: README.md

modified:   flake.nix
	modified:   home/README.md
	modified:   home/ssh.nix
	modified:   hosts/README.md
	modified:   hosts/desktop/README.md
	modified:   hosts/desktop/configuration.nix
	new file:   hosts/nixos-lxc/README.md
	new file:   hosts/nixos-lxc/configuration.nix
	renamed:    modules/wsl/default.nix -> hosts/nixos-lxc/default.nix
	modified:   hosts/server/README.md
	modified:   hosts/server/configuration.nix
	modified:   hosts/virtualbox/README.md
	modified:   hosts/virtualbox/configuration.nix
	modified:   hosts/virtualbox/hardware-configuration.nix
	modified:   hosts/wsl/README.md
	modified:   hosts/wsl/configuration.nix
	modified:   lib/README.md
	modified:   lib/hosts.nix
	modified:   lib/mkHost.nix
	modified:   modules/README.md
	modified:   modules/core/README.md
	modified:   modules/core/core.nix
	modified:   modules/core/users.nix
	modified:   modules/desktop/README.md
	modified:   modules/desktop/de/README.md
	modified:   modules/desktop/wm/README.md
	modified:   modules/desktop/wm/default.nix
	modified:   modules/drivers/README.md
	modified:   modules/drivers/amdgpu.nix
	modified:   modules/server/README.md
	modified:   modules/server/default.nix
	new file:   modules/server/firewall.nix
	modified:   modules/server/pkg.nix
	modified:   modules/server/ssh.nix
	modified:   modules/server/virtualbox-guest.nix
	deleted:    modules/wsl/README.md
	deleted:    modules/wsl/configuration.nix
	modified:   overlays/README.md
	modified:   profiles/README.md
	modified:   profiles/desktop.nix
	new file:   profiles/lxc.nix
	modified:   profiles/wsl.nix
	modified:   secrets/README.md
	modified:   secrets/users/README.md
添加了pve-lxc的配置文件 删除了wsl的配置文件
This commit is contained in:
luochen570
2026-03-01 19:38:51 +08:00
parent 26b5caa6d0
commit e4d82bc580
45 changed files with 206 additions and 115 deletions

View File

@@ -1,4 +1,4 @@
# 🧱 modules 目录说明
# 🧱 modules 目录说明
系统模块目录。大部分子目录通过 `default.nix` 提供统一入口,驱动目录采用按文件显式引用。
@@ -8,6 +8,8 @@
├─ 🧭 core/ # 全局基础模块
├─ 🖥️ desktop/ # 桌面模块DE/WM/应用)
├─ 🎮 drivers/ # 硬件驱动模块(如 NVIDIA
─ 🗄️ server/ # 服务器模块
└─ 🪟 wsl/ # WSL 模块
─ 🗄️ server/ # 服务器模块
```
`r`n

View File

@@ -1,4 +1,4 @@
# 🧭 modules/core
# 🧭 modules/core
所有主机场景都会引入的基础模块。
@@ -10,3 +10,5 @@
├─ 👤 users.nix # 用户、默认 shell、密码与公钥
└─ 🔐 sops.nix # sops-nix secret 映射
```
`r`n

View File

@@ -24,7 +24,4 @@
time.timeZone = lib.mkDefault "Asia/Shanghai";
i18n.defaultLocale = lib.mkDefault "zh_CN.UTF-8";
networking.firewall.enable = lib.mkDefault true;
system.stateVersion = lib.mkDefault "25.05";
}
}

View File

@@ -5,7 +5,7 @@
users.users.${username} = {
isNormalUser = true;
extraGroups = [ "wheel" ];
extraGroups = [ "wheel" "networkmanager" ];
shell = pkgs.zsh;
}
// lib.optionalAttrs (!(config.sops.secrets ? "users/luochen570/passwordHash")) {

View File

@@ -1,4 +1,4 @@
# 🖥️ modules/desktop 目录说明
# 🖥️ modules/desktop 目录说明
桌面能力模块按“桌面环境DE/窗口管理器WM/应用”拆分,便于后续扩展到多种桌面方案。
@@ -11,3 +11,5 @@
├─ 📦 pkg.nix # 桌面软件包
└─ 📱 apps.nix # 桌面应用与默认浏览器关联
```
`r`n

View File

@@ -1,4 +1,4 @@
# 🧭 modules/desktop/de 目录说明
# 🧭 modules/desktop/de 目录说明
桌面环境Desktop Environment目录。
@@ -8,3 +8,5 @@
├─ 📦 default.nix # 聚合入口(当前仅 KDE
└─ ⚙️ kde.nix # SDDM + Plasma 6
```
`r`n

View File

@@ -1,4 +1,4 @@
# 🪟 modules/desktop/wm 目录说明
# 🪟 modules/desktop/wm 目录说明
窗口管理器Window Manager目录当前为预留结构。
@@ -7,3 +7,5 @@
🪟 modules/desktop/wm
└─ 📦 default.nix # 预留 future importshyprland/sway 等)
```
`r`n

View File

@@ -1,7 +1,7 @@
{ ... }:
{
imports = [
# Future WM modules:
# 未来可引入的 WM 模块:
# ./hyprland.nix
# ./sway.nix
];

View File

@@ -1,4 +1,4 @@
# 🎮 modules/drivers 目录说明
# 🎮 modules/drivers 目录说明
硬件驱动模块目录,用于集中管理显卡等驱动配置。
@@ -9,3 +9,5 @@
├─ 🔴 amdgpu.nix # AMD iGPU(9700X) 用户态图形/计算支持
└─ 📝 README.md
```
`r`n

View File

@@ -1,8 +1,8 @@
{ pkgs, ... }:
{
# Ryzen 7 9700X iGPU (RDNA2) related userspace support.
# Keep as a secondary GPU setup; X primary driver is still controlled
# by the desktop profile / nvidia module.
# Ryzen 7 9700X 核显RDNA2相关的用户态支持。
# 作为辅助显卡配置保留X 的主显卡驱动仍由
# desktop profile / nvidia 模块控制。
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [

View File

@@ -1,4 +1,4 @@
# 🗄️ modules/server
# 🗄️ modules/server
服务器专用模块。
@@ -7,8 +7,10 @@
🗄️ modules/server
├─ 📦 default.nix # 聚合入口
├─ 📦 pkg.nix # 服务器常用软件包
├─ 🔥 firewall.nix # 防火墙默认策略
├─ 🔐 ssh.nix # OpenSSH 参数
├─ 🐳 docker.nix # Docker 与清理策略
├─ 📦 virtualbox-guest.nix # VirtualBox Guest 增强配置
└─ 🧠 vscode-server.nix # VS Code Server 模块
```

View File

@@ -2,6 +2,7 @@
{
imports = [
./pkg.nix
./firewall.nix
./docker.nix
./ssh.nix
];

View File

@@ -0,0 +1,4 @@
{ lib, ... }:
{
networking.firewall.enable = lib.mkDefault true;
}

View File

@@ -1,6 +1,6 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
jq
];
}

View File

@@ -2,13 +2,13 @@
{
services.openssh = {
enable = true;
openFirewall = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
X11Forwarding = false;
};
openFirewall = true;
};
}
}

View File

@@ -1,6 +1,6 @@
{ ... }:
{
# virtualbox-guest
# VirtualBox Guest 增强支持
virtualisation.virtualbox.guest.enable = true;
virtualisation.virtualbox.guest.dragAndDrop = true;
}
}

View File

@@ -1,11 +0,0 @@
# 🪟 modules/wsl
WSL 集成模块。
## 🌲 目录树
```text
🪟 modules/wsl
├─ 📦 default.nix # 聚合入口
├─ ⚙️ configuration.nix # WSL 配置实现
└─ 📝 README.md
```

View File

@@ -1,14 +0,0 @@
{ inputs, username, ... }:
{
imports = [
inputs.nixos-wsl.nixosModules.default
../server/vscode-server.nix
];
wsl = {
enable = true;
defaultUser = username;
};
users.users.${username}.extraGroups = [ "vscode" "docker" "wheel" ];
}

View File

@@ -1,6 +0,0 @@
{ ... }:
{
imports = [
./configuration.nix
];
}