At the end of the day, Linux packages are just programs.
So, do we really need environment.systemPackages and the like?
Why not install everything as either a service or a program (pseudo code):
{
environment.systemPrograms = with programs; {
bat.enable = true;
gimp.enable = true;
fish = {
enable = true;
vendor = {
config.enable = true;
completions.enable = true;
functions.enable = true;
};
};
starhip.enable = true;
}
This way, we can install and configure programs from one central location. Also it prevents installing, for example, docker both as a package and also enabling it via virtualisation.
I’ve not thought about this thoroughly, but maybe services can also be installed from the same location:
{
environment.system = {
services = {
};
programs = {
}
};
}
and:
users.users = {
ben = {
isNormalUser = true;
description = "Ben";
extraGroups = [ "networkmanager" "wheel"];
services = {
};
programs = {
};
};
}