Rework modules/programs
The current way of handling programs, is quite practical to use, as we only have to specify a list with bundles we want included in the image:
# Adapted, will not work
packageBundles = [
dev
devAsm
devTiger
# ...
];
and the same goes for Python and OCaml packages.
While this approach is easy to use, it falls short when we need to do additional configuration (like with OCaml packages or GTK packages), as it does not use the module system.
As such, I propose we switch to the following interface:
cri.pkgs = {
pkgs = {
graphical.enable = true;
dev.enable = true;
devGtk.enable = true;
};
python = {
core.enable = true;
};
# ...
};
This would allow the devGtk
module to do some extra configuration, while maintaining a relatively easy to use interface. It would also allow us to add extra options per-bundle. Moreover, in the above example, dev.enable = true;
could be omitted as devGtk
would depend on it and thus enable it automatically.