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

Deploy Nix config remotely #324

Closed
samhh opened this issue Jun 2, 2022 · 7 comments
Closed

Deploy Nix config remotely #324

samhh opened this issue Jun 2, 2022 · 7 comments
Labels

Comments

@samhh
Copy link
Owner

samhh commented Jun 2, 2022

I'd like to be able to do this:

# nixos-rebuild --flake ".#tentacool" --target-host sam@tentacool switch

It connects over SSH and starts copying until if fails with:

copying path '/nix/store/0ab7s7la2i4nkfa645prjn19lrx80r6y-linux-5.15.43-modules-shrunk' to 'ssh://sam@tentacool'...
error: cannot add path '/nix/store/0ab7s7la2i4nkfa645prjn19lrx80r6y-linux-5.15.43-modules-shrunk' because it lacks a valid signature
@samhh samhh added the bug label Jun 2, 2022
@samhh
Copy link
Owner Author

samhh commented Jun 3, 2022

There's a permissions error with --build-host localhost. There's --use-remote-sudo, however this doesn't appear to support doas.

@samhh
Copy link
Owner Author

samhh commented Aug 24, 2022

@samhh
Copy link
Owner Author

samhh commented Aug 24, 2022

a18deef

The following now appears to work:

$ NIX_SSHOPTS="-t" nixos-rebuild switch --flake ".#tentacool" --target-host sam@tentacool --use-remote-sudo

The ssh -t bit was described here: https://discourse.nixos.org/t/which-commands-are-required-for-remote-switch/17936/2

Edit: This no longer works...

@samhh
Copy link
Owner Author

samhh commented Aug 24, 2022

Something declarative and which doesn't require entering the remote's password would be ideal.

@samhh samhh pinned this issue Aug 24, 2022
@samhh samhh unpinned this issue Aug 29, 2022
@samhh
Copy link
Owner Author

samhh commented Aug 31, 2022

@samhh
Copy link
Owner Author

samhh commented May 27, 2023

deploy-rs is worth trying again: serokell/deploy-rs#207

@samhh
Copy link
Owner Author

samhh commented Aug 5, 2023

8840013

@samhh samhh closed this as completed Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant