From 708fb7420260535d6c246248b17a4d1a7a2c2022 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Mon, 10 Jun 2024 19:57:09 -0400 Subject: [PATCH] update ssh key location --- Tips & Tricks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tips & Tricks.md b/Tips & Tricks.md index b93aed3..f22b789 100644 --- a/Tips & Tricks.md +++ b/Tips & Tricks.md @@ -3,7 +3,7 @@ 2. Add host to `nixosConfigurations` in `flake.nix`. 3. (OPTIONAL) Generate a `cert.pem`, `key.pem`, and device ID for Syncthing with `syncthing -generate=$HOSTNAME`. Find the device ID in the generated `config.xml` and add it to `nixosModules/services/syncthing/default.nix`, encrypt the cert and key with agenix, and set them as appropriate in the host configuration. 4. Install NixOS from this flake. Secrets will _not_ be available on first boot. -5. Copy the new system's public SSH key (`/etc/ssh/ssh_host_ed25519_key.pub`) to the host configuration (`host/$HOSTNAME/ssh.pub`). +5. Copy the new system's public SSH key (`/etc/ssh/ssh_host_ed25519_key.pub`) to the host configuration (`secrets/publicKeys/root_$HOSTNAME.pub`). 6. Add the new public key to `secrets/secrets.nix` and rekey all secrets with `agenix --rekey`. 7. Rebuild the new system from git. Secrets will be automatically decrypted and immediately available in `/run/agenix/`. 8. (OPTIONAL) Generate a new user SSH key and add it to `nixosModules/users/default.nix` in order to enable passwordless logins to other hosts.