-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(provisioner): NixOS based image #662
Conversation
Able to boot the NixOS VM, but the cloud-init doesn't work properly leaving the machine in a broken state. There's a discussion going on to support NixOS as a proper Lima guest lima-vm/lima#430. Working examples:
Running lima with plain mode: |
Seems the ssh login is failing because |
It's possible to apply a nixos configuration into the machine using
Problem is that after a single apply (or reboot) the current user no longer has the ability to Maybe it's easier to add a generic user, ssh -F ~/.lima/bastion-vm/ssh.config ops@lima-bastion-vm |
Both
Now it's a matter of glueing everything together. |
Potential delegator \
--name nixos-rebuild \
--volume $HOME \
--volume $(realpath TMPDIR) \
--timout 10m \
--image image-builder:dev \
nixos-rebuild $@ This will create a docker container named |
For the result symlink some thoughts:
|
Trying to run
The following does work:
But the results symlink is still pointing to /nix/... |
Use ... Unfortunately does not work as expected! Ideally just use the ... Seems to work when setting the ... Trying to nix build with a store location in the delegator volume mount gives this error:
Definitely feels like we're trying to do the wrong thing here 🤔 |
Optimisations for the delegator:
Are there alternatives like |
See if we can make the setup more standard:
|
ref #661
TODO
nixos-rebuild
andnix
into binstub calling into temporary docker containerbin/nix-exec
bin/nixos-rebuild
andbin/nix
bin/nix-exec
, that way don't have worry about paths being mounted.nix build
? Can we make an impure flake which puts the result in the local directory? Or can we deal with the symlink somehow?.bazel
extension (or add.pants
to pants ones?)