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

nixos-rebuild: fix for NIX_SSHOPTS #342596

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

name-snrl
Copy link
Contributor

Description of changes

Reopening #326636. Apologies to anyone I mistakenly mentioned in that thread.

Note that if the target system does not include this patch, you should use the --fast option, otherwise nixos-rebuild from the target system will be used.

@roberth I added a test case to nixos-rebuild-target-host, I think this is an appropriate place. I've also added some commits that group some pieces of code together. I'm not sure if this is really necessary, but I wanted to bring more clarity to the mess.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

When I tried to update a node with a specific ssh key using the ssh `-i`
flag. It threw an error:

```
Permission denied (publickey)
```

But the path and key were correct, I could connect via ssh directly. The
problem is that in NixOS#283634 we have started running the remote command to
get the hostname, but $SSHOPTS is declared below that line, causing them
to be ignored.
At the moment `edit` really doesn't rebuild nix, but that's because of
the order in which the commands are executed. This doesn't seem like a
reliable solution, so I defined it in a more explicit way
@name-snrl
Copy link
Contributor Author

@roberth @K900 maybe you'll have time to look. Rebased and ready to merge.

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

Successfully merging this pull request may close these issues.

2 participants