Create a new VM. If it already exists, delete it with multipass delete nix-issue-8953
, then multipass purge
multipass launch -n nix-issue-8953 --disk 10G --cloud-init cloud-init.yaml --verbose
You can check the startup logs to check that the commands in cloud-init.yaml were successful.
multipass exec nix-issue-8953 -- sudo cat /var/log/cloud-init-output.log
We can see that there's a registry.json already created by the startup script. It contains a redirection from github to the local disk.
multipass exec nix-issue-8953 -- sudo cat /root/.config/nix/registry.json
We can see that Nix is aware of the user flake registry override.
multipass exec nix-issue-8953 -- sudo bash --login -c "nix registry list"
We can see that the source code is present on the disk, in the expected place.
multipass exec nix-issue-8953 -- sudo ls /flakes/github.com/numtide/system-manager
We can see that it can't run the flake, because it's trying to download from Github, when it should be looking on the local disk instead.
multipass exec nix-issue-8953 -- sudo bash --login -c "nix run github:numtide/system-manager"