modified: README.md
modified: modules/server/README.md new file: modules/server/lxc-ssh.nix modified: profiles/lxc.nix
This commit is contained in:
@@ -57,7 +57,7 @@ nixos/
|
||||
│ ├── server/ # 服务器
|
||||
│ ├── wsl/ # WSL (NixOS-WSL)
|
||||
│ ├── virtualbox/ # VirtualBox 虚拟机
|
||||
│ └── nixos-lxc/ # Proxmox LXC 容器 (s0.sermc.net)
|
||||
│ └── nixos-lxc/ # Proxmox LXC 容器
|
||||
└── secrets/ # sops-nix 加密密钥(不公开)
|
||||
└── users/luochen570.enc.yaml
|
||||
```
|
||||
@@ -70,7 +70,7 @@ nixos/
|
||||
| `server` | server | x86_64-linux | 服务器 |
|
||||
| `nixos-wsl` | wsl | x86_64-linux | WSL |
|
||||
| `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 容器 |
|
||||
|
||||
## 使用
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
🗄️ modules/server
|
||||
├─ 📦 default.nix # 聚合入口
|
||||
├─ 🔐 ssh.nix # OpenSSH 参数
|
||||
├─ 🔐 lxc-ssh.nix # LXC OpenSSH 覆盖参数
|
||||
├─ 🐳 docker.nix # Docker 与清理策略
|
||||
└─ 📝 README.md
|
||||
```
|
||||
|
||||
8
modules/server/lxc-ssh.nix
Normal file
8
modules/server/lxc-ssh.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
# LXC 容器需要密码登录
|
||||
services.openssh.settings = {
|
||||
PermitRootLogin = "prohibit-password";
|
||||
PasswordAuthentication = true;
|
||||
KbdInteractiveAuthentication = true;
|
||||
};
|
||||
}
|
||||
@@ -1,14 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
../modules/core
|
||||
../modules/server
|
||||
../modules/server/lxc-ssh.nix
|
||||
];
|
||||
|
||||
# LXC 容器需要密码登录(s0.sermc.net,无 SSH key 注入)
|
||||
services.openssh.settings = {
|
||||
PermitRootLogin = "prohibit-password";
|
||||
PasswordAuthentication = true;
|
||||
KbdInteractiveAuthentication = true;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user