Skip to content
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

Fix deploying with SOPS secrets on first deploy #3

Open
ibizaman opened this issue Dec 19, 2024 · 0 comments
Open

Fix deploying with SOPS secrets on first deploy #3

ibizaman opened this issue Dec 19, 2024 · 0 comments

Comments

@ibizaman
Copy link
Owner

Currently, the expected flow is to deploy once with an empty config and then to add stuff in the config that could include SOPS.

This is because nixos-anywhere doesn´t generate the ssh host keys, this happens on first boot.
Then, you can get the generated key with https://github.com/ibizaman/skarabox/tree/main/template#secrets-with-sops and transform it into an age key and let the server decrypt the host file.

This is inconvenient at best and confusing at worst.

Instead, we should generate an ssh key on the machine used to deploy, use nixos-anywhere to send it to the correct location. (btw, this won't get overwritten by the script since it's checking if a file exists first before generating an ssh key). We could then add the age key to the SOPS file before the install process with nixos-anywhere and we could also add the host key to the laptop's known hosts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant