Cachix for Hyprland

The installation instructions for Hyprland say:

In order for Nix to take advantage of the cache, it has to be enabled before enabling the Hyprland module(s) or adding the package.

Is there a way of enabling the cache after I have enabled the Hyprland module? Seems like this should be easy for a declarative OS.

Yes, however if you don’t do so before you evaluate the configuration the first time, obviously your cache will not be configured yet, so nix will build Hyprland from scratch instead of downloading it from a cache.

This will take time and might annoy you, so the docs suggest you do it beforehand.

After nix builds Hyprland it will also cache it locally. So while you can of course still enable the remote cache any time, it won’t actually use it until you tell nix to install a different version of Hyprland you don’t yet have locally (whether through updates or choosing a different build). So the docs are technically correct… But rewording it might indeed be a good idea.

1 Like

Ah. Your explanation makes sense and it is what I thought would have happened.

Thanks once again!