NixOS / nixops

NixOps is a tool for deploying to NixOS machines in a network or cloud.
https://nixos.org/nixops
GNU Lesser General Public License v3.0
1.77k stars 365 forks source link

system.autoUpgrade undoes nixops deployments #990

Open costrouc opened 5 years ago

costrouc commented 5 years ago

Nixops does not actually seem to update the /etc/nixos/configuration.nix file. I had a weird issue where overnight all of my nixos deployments would suddenly revert to a really old configuration (the existing one in /etc/nixos/configuration.nix ). This caused me quite the headache since I am quite new to nixos. Looking at my journalctl logs I saw

Aug 17 04:41:10 nixos systemd[1]: Started NixOS Upgrade.

So it looks like system.autoUpgrade.enable = true causes the /etc/nixos/configuration.nix file to be used for an update. Thus system.autoUpgrade should not be used with nixops deployments. Anyways I found this counter intuitive and I figure someone else may run into this same issue.

r-vdp commented 5 years ago

Additionally, what's the recommended/preferred way then to have automatic updates in nixos in combination with nixops?

costrouc commented 5 years ago

I think that this problem would be solved if nixops optionally wrote the system configuration to /etc/nixos/configuration.nix. As for now I dont have a simple answer.

craigem commented 4 years ago

This looks like a duplicate of #842