feat: 启用 SSH 服务并添加 authorized key

This commit is contained in:
2026-04-11 18:13:44 +08:00
parent 1662e21ea4
commit b961a7c0d0
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -10,11 +10,17 @@
# ── Default shell ──────────────────────────────────
programs.fish.enable = true;
# ── SSH ──────────────────────────────────────────
services.openssh.enable = true;
# ── Default user ───────────────────────────────────
users.users.${username} = {
isNormalUser = true;
shell = pkgs.fish;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDRTOo48gzzRGT+bF9dzJCFJu61YgsQVONFtxU9kTPIg"
];
};
# ── sudo ───────────────────────────────────────────