-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impermanence issues with SSH when provisioning with nixos-anywhere + disko + flakes #192
Comments
I could not install a nixos system with |
I ran into this same issue and instead of doing what you did I just changed my openssh configuration to point to persist directly. services.openssh = {
hostKeys = [
{
type = "ed25519";
path = "/persist/etc/ssh/ssh_host_ed25519_key";
}
{
type = "rsa";
bits = 4096;
path = "/persist/etc/ssh/ssh_host_rsa_key";
}
];
}; |
Smart. Thanks for sharing!
…On Sun, Oct 20, 2024 at 7:48 PM Collin Arnett ***@***.***> wrote:
I ran into this same issue and instead of doing what you did I just
changed my openssh configuration to point to persist directly.
hostKeys = [
{
type = "ed25519";
path = "/persist/etc/ssh/ssh_host_ed25519_key";
}
{
type = "rsa";
bits = 4096;
path = "/persist/etc/ssh/ssh_host_rsa_key";
}
];
—
Reply to this email directly, view it on GitHub
<#192 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADAHPZ6PUYC6ZT6EHENGBLZ4Q6NJAVCNFSM6AAAAABJYKVYXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRVGI4TMNZZHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I encountered an issue when trying to use impermanence to mount SSH host keys in NixOS while provisioning a new host with nixos-anywhere + flakes + disko.
I believe the problem is because the SSH host keys are generated during at boot time. The nixos-anywhere provisioning process fails with the following output:
As a workaround, I tried making the entire /etc/ssh directory persistent. This allows nixos-anywhere to provision the system successfully. However, on the first boot, the sshd_config file from the nix-store is not present in the /etc/ssh persistent directory.
A reproducible MVP is here: https://github.com/visualphoenix/nixos-anywhere-disko-impermanence-mvp
Expected behavior:
Actual behavior:
Please let me know if you need any further information or clarification regarding this issue.
The text was updated successfully, but these errors were encountered: