modified: README.md

modified:   modules/server/README.md
	new file:   modules/server/lxc-ssh.nix
	modified:   profiles/lxc.nix
This commit is contained in:
luochen570
2026-05-27 07:02:37 +08:00
parent a2bd672cf7
commit 575529f159
4 changed files with 12 additions and 10 deletions

View File

@@ -57,7 +57,7 @@ nixos/
│ ├── server/ # 服务器 │ ├── server/ # 服务器
│ ├── wsl/ # WSL (NixOS-WSL) │ ├── wsl/ # WSL (NixOS-WSL)
│ ├── virtualbox/ # VirtualBox 虚拟机 │ ├── virtualbox/ # VirtualBox 虚拟机
│ └── nixos-lxc/ # Proxmox LXC 容器 (s0.sermc.net) │ └── nixos-lxc/ # Proxmox LXC 容器
└── secrets/ # sops-nix 加密密钥(不公开) └── secrets/ # sops-nix 加密密钥(不公开)
└── users/luochen570.enc.yaml └── users/luochen570.enc.yaml
``` ```
@@ -70,7 +70,7 @@ nixos/
| `server` | server | x86_64-linux | 服务器 | | `server` | server | x86_64-linux | 服务器 |
| `nixos-wsl` | wsl | x86_64-linux | WSL | | `nixos-wsl` | wsl | x86_64-linux | WSL |
| `virtualbox` | virtualbox | x86_64-linux | VirtualBox 虚拟机 | | `virtualbox` | virtualbox | x86_64-linux | VirtualBox 虚拟机 |
| `nixos-lxc` | lxc | x86_64-linux | Proxmox LXC 容器 (s0.sermc.net) | | `nixos-lxc` | lxc | x86_64-linux | Proxmox LXC 容器 |
## 使用 ## 使用

View File

@@ -7,6 +7,7 @@
🗄️ modules/server 🗄️ modules/server
├─ 📦 default.nix # 聚合入口 ├─ 📦 default.nix # 聚合入口
├─ 🔐 ssh.nix # OpenSSH 参数 ├─ 🔐 ssh.nix # OpenSSH 参数
├─ 🔐 lxc-ssh.nix # LXC OpenSSH 覆盖参数
├─ 🐳 docker.nix # Docker 与清理策略 ├─ 🐳 docker.nix # Docker 与清理策略
└─ 📝 README.md └─ 📝 README.md
``` ```

View File

@@ -0,0 +1,8 @@
{
# LXC 容器需要密码登录
services.openssh.settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = true;
KbdInteractiveAuthentication = true;
};
}

View File

@@ -1,14 +1,7 @@
{ ... }:
{ {
imports = [ imports = [
../modules/core ../modules/core
../modules/server ../modules/server
../modules/server/lxc-ssh.nix
]; ];
# LXC 容器需要密码登录s0.sermc.net无 SSH key 注入)
services.openssh.settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = true;
KbdInteractiveAuthentication = true;
};
} }