"programs.foo.enable = true" vs "systemPackages=[foo]" is confusing

If you’re on nix, don’t forget about man configuration.nix

It will be a good local reflection of whats on nixos-option / NixOS Search . If you prefer man format.

To answer your original question, generally the ‘.enable = true’ options are preferred as they will be smart about a system effects which are needed to the application/service to run correctly. For example, ‘virtualization.docker.enable = true’ will create the necessary groups, install the docker-daemon, install the docker cli, and a few other things to enable normal docker usage.

2 Likes