I am running nixos 22.05 on a new Dell XPS 15. My issue is that every package I am installing (system-wide or user-wide) is built from source. Thus, installing/updating packages takes rather long.
Before I had nixos running on another laptop, where I did not have this issue.
That shoudn’t cause any rebuilds (even though I’d suggest to use 2.8 which is the default for 22.05)
Also, do you perhaps have any overlays configured? Be it in the configuration or in the ~/.config/nixpkgs/overlays.nix, where you have to check your users and roots HOME.
Last but not least, what is the output of nix --experimental-features nix-command show-config|grep subst?
It’ll be hard to say much without seeing your config. One thing you could do to verify the substituter settings would be nix --extra-experimental-features nix-command show-config | egrep 'substituters|trusted-public-keys'
Interesting, how could I check that? The issue is happening when I am installing in my user from the nixos-stable channel like nix-env -iA nixos-stable.*. And also when installing packages system-wide with nixos-rebuild where mit pkgs come from the nixos channel.
As you are using non-flake evaluation is not pure and depending on how you rebuild your system and how you set up sudo, the user based package overrides might leak.
Thank you to everyone in this thread for helping. Much appreciated <3
The issue was with the inherit pkgs in my .config/nixpkgs/config.nix in my package overrides, as pointed out by @NobbZ .