After setting up cachix, the Hyprland wiki says to use:
# configuration.nix
{pkgs, ...}: let
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
hyprland = (import flake-compat {
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/main.tar.gz";
}).defaultNix;
in {
programs.hyprland = {
enable = true;
# set the flake package
package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# make sure to also set the portal package, so that they are in sync
portalPackage = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
}
But that just gives me the following error: error: in pure evaluation mode, 'fetchTarball' requires a 'sha256' argument
Is there a better method to use in NixOS to get the latest version of hyprland on 24.05? If not, where do I put the âsha256â argument missing from the wikiâs instructions?
Hi, with flakes it would be easier to update your system without having to set the hash manually every time hyprland is updated, but except that I think itâs fine.
I noticed that the hyprland repo has a flake.nix file. How would I set this up to use the flake and avoid having to update the hash every time hyprland updates?
Flakes pins all your dependencies versions in a lockfile (flake.lock), you can update them running nix flake update.
Hyprland provides some package overlays, here is how your flake.nix would look like (it also includes home-manager which is useful to configure hyprland):
Also still struggling through this libinput issue. The instructions for this are difficult to tailor for everyoneâs unique setup. I wouldnât recommend going down this path if youâre a new user like me.
Currently getting this error:
error: The option `additions' does not exist. Definition values:
- In `/nix/store/lq0xf7r3w87wq5fjh369l2073pq38kfg-source/overlays/hyprland': <function>`
Another user on another thread recommends not mixing channels for graphical applications, such as hyprland. As an alternative, the user recommends using the âunstableâ channel, but that caused other, bigger issues like this python dependency bug and gnome keyring bug. Iâm curious what other users experiences have been here. If you have a similar or opposing stance, please leave a comment below.
I didnât just not recommend it, I said itâs explicitly something that Nixpkgs does not support (on a technical level). If you mix channels, youâre on your own.
If you want something that is supported by the upstream nixpkgs community in any way, you need to use exactly one revision of nixpkgs at once. Anything more might work for some cases but is likely to fail for others and we canât help you with those.
Stuff like that will crop up; itâs the unstable channel afterall. Bugs like that typically get fixed within a few days. You can survive for a week without updates. Just wait a few days if youâre not in a position to fix the bugs yourself and perhaps help review PRs that intend to fix such issues (re-assurance that PRs do what they intend to do helps us maintainers quite a lot).
There is no âopposing stanceâ; this isnât an opinion.