sometimes installing declaratively won’t succeed in hitting cache for mysterious reasons. for example, libreoffice never hits cache when it put in configuration.nix (and I’m not overriding any package in my config). so i use nix-env, now actually nix profile install, to installs it hitting cache successfully.