-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
on proxmox-lxc
container fails with busctl
error, and causes other configuration change from base image
#319
Comments
Just to follow-up... are we not supposed to be able to run |
I don't use proxmox or lxc so I can't comment on any of that specifically. Broadly, I suspect if you copy your config into the container and rebuild from that it could work, but I can't speak too much to that either. The way I use |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
Glad to see I'm not the only one having issues. So is this a feature, not a bug? Should I be doing all of my configuration and packing it into the tarball? It seems unnecessary to have to do that for even the smallest of changes. |
Summary
Running
nixos-rebuild
on a customized (or vanilla)proxmox-lxc
image is unsuccessful, renders the container into an unmanageable state, and some configuration seems to be removed.Steps to reproduce:
a.
nix run --extra-experimental-features nix-command --extra-experimental-features flakes github:nix-community/nixos-generators --format proxmox-lxc -c /tmp/firstboot.nix
b.
cat << EOF > /tmp/firstboot.nix
configuration.nix
:nixos-rebuild test
a. This actually borks the system the exact same as a
switch
would, even though it's only atest
.5. Re-run
nixos-rebuild switch
Issues
Pre-reboot:
busctl
issue above as output ofnixos-rebuild
Post-reboot:
nixos
a. This does not happen if I use the vanilla image from hydra.
a. This is probably because it's not defined in the
configuration.nix
file that got rebuilt against, but I wasn't expecting this behavior.nixos-rebuild switch
again:Suspicions
I suspect this is because:
/etc/nixos/configuration.nix
is overriding whatever the build was built with, which disables everything that the container was built with (including hostname.)glibc
and whatever else gets installed causes an error for the (unprivileged) container restarting systemd services.a. I'm not sure, but this might have something to do with:
nixos-rebuild
ready image #86I would expect (without having my understanding of the internals of nixos) to be able to take the base image of the container, and to create a
/etc/nixos/configuration.nix
and runnixos-rebuild switch
that does not break and/or modify the configuration of the base image, or have a way in which to include the configuration of the base image in such a way as to preserve the existing configuration.I'm happy to do any further testing required in regards to these issues :)
The text was updated successfully, but these errors were encountered: