Install NixOS on Amazon EC2/zh: Difference between revisions
Appearance
Created page with "AWS 上可用的 NixOS AMI 列表位于 [https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/amazon-ec2-amis.nix 此处],更新的列表位于:[https://nixos.github.io/amis/ 此处](参见 [https://discourse.nixos.org/t/ami-for-nixos-23-11/36860/7 此讨论线程])。" |
Created page with "这些 AMI 的默认用户是 <code>root</code>。没有默认密码,而是使用在 EC2 创建过程中选择的 SSH 密钥进行身份验证。" |
||
| Line 7: | Line 7: | ||
AWS 上可用的 NixOS AMI 列表位于 [https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/amazon-ec2-amis.nix 此处],更新的列表位于:[https://nixos.github.io/amis/ 此处](参见 [https://discourse.nixos.org/t/ami-for-nixos-23-11/36860/7 此讨论线程])。 | AWS 上可用的 NixOS AMI 列表位于 [https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/amazon-ec2-amis.nix 此处],更新的列表位于:[https://nixos.github.io/amis/ 此处](参见 [https://discourse.nixos.org/t/ami-for-nixos-23-11/36860/7 此讨论线程])。 | ||
这些 AMI 的默认用户是 <code>root</code>。没有默认密码,而是使用在 EC2 创建过程中选择的 SSH 密钥进行身份验证。 | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Revision as of 19:15, 28 August 2025
Amazon EC2 是一个广泛使用的云部署平台,隶属于亚马逊网络服务 (AWS)。NixOS 主要通过 AMI 和 nixos-generators 项目支持该平台。
公共 NixOS AMIs
AWS 上可用的 NixOS AMI 列表位于 此处,更新的列表位于:此处(参见 此讨论线程)。
这些 AMI 的默认用户是 root。没有默认密码,而是使用在 EC2 创建过程中选择的 SSH 密钥进行身份验证。
Creating a NixOS AMI
The nixos-generators project is currently the best method to create your own NixOS AMI. Follow the directions provided by nixos-generators & then follow the instructions provided by AWS.
Additional Resources
Building and Importing NixOS AMIs on EC2 by Jack Kelly
Troubleshooting
SSH Asks For Password
When connecting to a newly launched EC2 instance via SSH, it may ask for a password. This seems to be because the amazon-init systemd service is still reading user data. Back out of the current SSH attempt and try again in a few minutes.