General questions for a popularization article in France

Hi all,

Linux Pratique, a french magazine, has validated my draft of article (only the plan) about my experience on NixOS :blush:

While writing the article, I realized that some points are still not clear to me.

  1. Can we say that NixOS, in addition to the functional philosophy, has a top-down philosophy: it starts from the desired system configuration and handles all the steps to reach the destination – whatever is the initial state. Whereas, imperative distributions, have a bottom-up process, giving tools to move the current state of the system from one state to another until the destination is reached. Is it correct ?
  2. NixOS does not seem to be a rolling release like Arch Linux does. For instance, in configuration.nix there is a pinned system.stateVersion, currently 19.03. That leads me to a question: what are the breaking changes between versions ? Is it a bad point for NixOS compared to Arch Linux ? Does it imply that a user of NixOS will need to make a full re-installation at some point, to follow the last version ?
  3. If I’m not mistaken, NixOS is able to build Docker images with rather minimal sizes. These docker images only include run-time dependencies, aren’t they ? Otherwise, what else do they contain ? Is it easy to build such minimal docker images ? How easy is it to build them compared to building images with multi stage builds ?

PM me if you want to know more about the article, or if you want to involve yourself, the aim is to develop the community in my country. I felt a bit alone on NixOS, colleagues were almost laughing at me because I was using a rather unknown distribution :roll_eyes: I wished that I could have shown them more articles in popular magazines.

7 Likes

Hello,

It’s nice to see someone from a good french magazine interested in NixOS :+1:

I think you are correct with your first question. In particular the nixos-rebuild and nixos-install commands are idempotent, and will always result in the same system (if you are using the same commit of nixpkgs and the same system config).

The system.stateVersion variable is only used to pin some packages (like postgresql). It is used to prevent upgrades to versions not compatible with their current data format. The services affected by this variable are usually stated in the NixOS release notes, it’s also possible to grep the nixpkgs repo as there are not much package using this.

This variable is meant to never be changed, so to upgrade a system from version 18.09 to 19.03 you only have to update the channel (with the nix-channel command). It is however possible to use NixOS as a rolling release with the use of the nixos-unstable channel which is tracking the master branch of nixpkgs after automated tests are run.

About the docker image builder it will only contain the specified packages and their dependencies. To build one you have to create a .nix file with the corresponding derivation. More information here: https://nixos.org/nixpkgs/manual/#sec-pkgs-dockerTools

I would be happy to see a good article on NixOS in a french magazine, if you have more information on the release date please tell me :slight_smile:

1 Like

I first want to reiterate the already well made point: system.stateVersion is not the version of the installed system. It is the version of the “state schema”. It should not be changed after an installation, unless specified, and as of right now, it never was specified to do so, and development tries to ensure we never need to.


About rolling release, the nixos-unstable channel is kind of a rolling release, it ends up being forked and frozen for release in the release process. Many NixOS users are following nixos-unstable, and the fact that the testedtest suite has to pass on hydra to update the channel makes updates relatively safe.

In a way, NixOS has its cake and ate it too! (Le bœuf et l’argent du bœuf.) There is the stable release cut at regular intervals, for users desiring such a scheme, and there is the unstable channel, for users preferring something like a rolling release.


In addition, if you want to have me read your close to final draft, to verify informations, je peux bien, étant francophone de langue maternelle.

And thanks for writing words about the distribution for reaching out!

In a way, NixOS has its cake and ate it too! (Le bœuf et l’argent du bœuf.) There is the stable release cut at regular intervals, for users desiring such a scheme, and there is the unstable channel, for users preferring something like a rolling release.

I would say that «having the cake and eating it, too» would correspond to running a mix of software from stable and unstable channel (which is hard everywhere else and usually easy with Nix)

3 Likes

Oops! That was my first thought when writing that paragraph, but it got lost somewhere between my brain and my fingers. Yes, you can follow the stable release for your system, and pick and match what you need from the rolling release. There is where the beef is at :).

Hi jojo,
Thanks for this article.
You’re not alone on NixOS in France. You may already know some articles on LinuxFR (https://linuxfr.org/tags/nix/public). I talked about Nix, in a french conference and in a french meet-up (https://juliendehos.gitlab.io/lillefp-2019-nix/). You can contact me if you want, maybe I can help.

1 Like

Indeed. I’ve not made the jump yet, but tried a few years ago and am motivated for this summer… Also, there is a #nixos-fr IRC channel on freenode with few people inside :wink:

1 Like