Usability study session #4

previous study | index | next study

1. Bio / Persona

More than 10 years of Linux experience, 1-2 years experience in professional software development, writing Rust and Elixir.

Regular Arch Linux user.

2. Prior Nix experience

Nix beginner, less than 6 months of experience. Daily NixOS user, but has difficulties fixing issues in the current installation.

3. Approaches to learning Nix

Biggest issues with documentation is that even hot topics are covered sloppily, and hard to discover where one should look for information. Cases in point:

  1. Use flakes or not?

    It’s a significant change of how to do things, and the concensus seems to be that this is the way forward, but there is a lot of noise surrounding this. Posts on Tweag blog are very basic, mostly focused on pinning, but not clear how it relates to system configurations.

  2. Home Manager

    The prevalent advice for most NixOS user configuration question, but it is not straightforward to use, especially when one never worked with dotfiles in an organized manner before.

  3. What is Nix?

    Found Wil T’s videos which clear this up.


  4. Hard to judge what are examples of essential and accidental complexity in the Nix ecosystem.


4. Using Nix

Kick-off problem: syncthing does not start automatically. Simply running syncthing works, but not as a service.

Looks up “Syncthing” page in the, but wants to start it as a user service, and the example only shows it for NixOS.

Opens NixOS manual, but there’s nothing about Syncthing. NixOS/nixpkgs#193297

There is now a section in 57.2. systemd in NixOS to help with setting up system and user systemd services.

Goes to Home Manager’s GitHub repo, which has its own configuration module for Syncthing. Follows 3.2. Standalone setup section to set up Home Manager with flakes by using a hand-rolled script (based on the instructions in the aforementioned section):

nix build .#homeManagerConfigurations.<user>.activationPackage

The generated home.nix is working.

Figures out how to query the status of systemd user services. One of the services belonging to Syncthing that did not start is syncthingtray.

systemctl --user status syncthingtray.service

It shows that it had errored out on something about libraries.

The troubleshooting session stops here to talk about the sources of frustration when it comes to finding a solution to one’s problems:

  • How to debug an issue, especially if it does not work as documented?

    Participant: Tried to iron out configuration issues with nix repl, but got stuck fast. It would be great if one could debug on one’s own or if there would be a general troubleshooting guide, because my Nix knowledge is not enough to approach this.

  • People usually ask on the NixOS Discourse or in the chat when they have configuration issues. Knowledge gets scattered all over the place, making relevant examples hard to find, and I haven’t asked about my issue yet.

    Interviewer: Why did you not ask on the forum?
    Participant: It would help a lot to have guides on how to build a sandbox / container / VM to reproduce the error and/or to produce a minimal example.

    Interviewer: Would a communication map help finding solutions?
    Participant: discourse#22118 Some guidance would still be helpful about how to ask good questions on Discourse.

  • What is a recommended directory structure for configuration files? Or is there a template somewhere or a best practice at least?

  • Some of the found examples use overlays, and it is hard to figure out the rationale behind why they are usually organized the way they are (e.g., split apart from the default.nix in many cases).

  • Old configurations use many modules; never had a need for custom modules, and not sure what they are for.

  • Some configuration examples were from people using one repository for multiple systems. How?

  • The’s Configuration Collection is great, but it would be so much better if there would a description accompanying each configuration about how the authors arrived at their solutions.

The session ends here.


Hosted by Flying Circus.