-
Notifications
You must be signed in to change notification settings - Fork 102
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
Rebooting reverts machine to old generation #254
Comments
I'm not sure what's going on here, but the first things that stand out to me are that you only have 1 system profile after deploying (iirc one gets added, not entirely replaced), also that the store path of the system profile is Can you post a snippet of your |
Can confirm I am using lib.activate wrapper. Here is the snippet ( deploy = {
sshUser = "root";
user = "root";
nodes = mkDeployNodes (machine: {
hostname = machine.hostName;
profiles.hypervisor = {
path = deploy-rs.lib.${system}.activate.nixos
self.nixosConfigurations.${machine.name};
};
});
}; I also find it puzzling why the system profile is replaced. I don't think I have the knowledge to debug profiles unfortunately, but I will try to install NixOS on a system manually without nixos-anywhere. Maybe that makes a difference. |
I think it's probably because of the profile name |
Thank you, that was indeed the problem! Perhaps this is lack of knowledge of NixOS internals from me, but it was not entirely clear from the docs. Anyways, I'm a happy camper! |
I am using deploy-rs to configure my server, but after a reboot the server reverts to an older configuration. I am not entirely sure how to debug this problem, so any pointers are appreciated. I initially installed NixOS using nixos-anywhere, so this might be part of the problem.
I did notice that
/run/current-system
is reverted back to/run/booted-system
(which is the same as/nix/var/nix/profiles/system
) after a reboot.Here you can see the effect of deploying and rebooting the server.
The current state, after running for a while and applying various configurations:
Note that the
/nix/var/nix/profiles/default
symlink above points to a non-existent file.The state after rebooting:
Above we see that the system reverted back to
/run/booted-system
.The state after re-applying my configuration using deploy-rs again:
The text was updated successfully, but these errors were encountered: