Config Recommendation System Idea

I have an idea for a system based on Nixos that recommends options to add to your nix config files based on what options you have set and a dataset of public configs on Github.
What do people think of this idea?


Seems like a pretty neat idea. If say 90% of users have some option set (one way or another) that I don’t, it would be good to know about that.

On the other side, it could be interesting to train a neural network or some other ML model on public nixos configs, and try to find patterns or predict autocompletes or something along those lines.



The system, which will start with only Boolean values, will be implemented in two layers. The first of which is the tips.nix files, these evaluate to an array of the following format:

    ifValue = "";
    thenValue = "";
    weight = 0;
  # And so on...

ifValue being the value that it checks for in the config, thenValue the value it suggests or not, and weight being an integer between -100 and 100 that, if positive recommends the thenValue that much and if negative discourages the thenValue that much. These files should work with nixos, home-manager, nix-darwin, nixops, etc.

On the second layer, there is tools that generate these files using machine learning or just user input.

This is used by the end user, with a tool that you pass the type of configuration (like nixos or home-manager), the main configuration file, and a tips.nix file. And outputs what to add or remove, based on the weights.

Finally, it should be considered what to do if in a tips.nix file there are two of the same thenValue activated but with different weights. I was thinking some kind of average rounded to a whole number.

What do you think?

I have made the first proof of concept:

There is one change from the earlier post: ifValues is now an array, instead of ifValue (string), allowing for multiple requirements to be all true.

1 Like

The system now has a more mature command line interface, as well as support for dynamic options (such as<name>.address ). I am at the moment looking for testing and feedback, as well as ideas for other tips files.