6 ms·
>> If I want to know how I configured my nas three years ago, all I have to do is read the nix file I checked onto github. Thats powerful. Have you had to deal
by kylek 6y ago
>> If I want to know how I configured my nas three years ago, all I have to do is read the nix file I checked onto github. Thats powerful.
Have you had to deal with breaking changes in the config language? (Does this ever happen? Are there versions/specs of the language that can be pinned?)
- tinco 6y agoI don't remember any changes in the language, but I did encounter packages that had their configuration renamed or changed in a way that broke my config. Basically you pin to a version of NixOS, and opting into the next version is fully optional. So if you change your NixOS version, and you run nixos-rebuild, and stuff doesn't work, then you can just undo your change. NixOS even keeps a backup of itself ready, so say for some reason you update but your new version doesn't boot, you can simply boot into your previous working version.
- takeda 6y agoSo nix has ability to pin to specific version and you can get exact same system. With an OS there is a problem, because most of the time you don't want to do that, you want to get security patches and erratas. For this purpose channels are used. They promise to not break anything within release channels. This is very similar to how other OSes, you need to trust them to not break thighs. There is also option to subscribe to a rolling release, so similarly to other OSes there are more opportunities for things to break (living on the edge and all), but the stuff below still applies. On top of that there is also variable in your configuration.nix it is set to the version of NixOS that you first installed. That version is version of the configuration file and supposed to guarantee compatibility. The compatibility they mentions are things like for example default version of PostgreSQL that they use if you choose default one you don't want on system upgrade to automatically force you to upgrade your database. Another obvious change is change of defaults, perhaps they decided that service that was previously enabled by default should be now disabled etc. You can bump the version in that file, but then you have to go through changelog and adapt your config to these changes. I am relatively new NixOS user, but just did uphrade from 19.09 to 20.03 and it went smooth as if it was just update within the same release.