Hyprland on Other Distros
Using hyprland via Nix on distros that aren’t NixOS is very simple.
First, install nix with your package manager, be that apt, pacman, dnf, etc. The package
is almost always called nix.
For example:
sudo pacman -S nixThen enable the daemon:
sudo systemctl enable --now nix-daemonAdvanced users might want to use Home Manager. If you don’t know what this is, just don’t.
Before you do anything, enable flakes, by adding this to /etc/nix/nix.conf or ~/.config/nix/nix.conf:
experimental-features = nix-command flakesonce that is done, install Hyprland through nix profile:
Installing Hyprland (and other hypr* tools) can be done like so:
sudo nix profile add --profile /nix/var/nix/profiles/default github:hyprwm/hyprnix#hyprlandReplace #hyprland with a different app from the flake to install it (e.g. #hyprpaper)
Since you’re using Hyprland outside of NixOS, it won’t be able to find graphics drivers. To get around that, you can use nixGL.
Just install it like so:
sudo nix profile add --profile /nix/var/nix/profiles/default github:guibou/nixGL --impure--impure is needed due to nixGL’s reliance on hardware information.
Since 0.53.2, start-hyprland will automatically use nixGL if needed. For versions before that,
you must use nixGL start-hyprland.
Lastly, if you are using a Login Manager, like SDDM or GDM, you need to symlink the .desktop file
like so:
sudo mkdir -p /usr/share/wayland-sessions
sudo ln -sf /nix/var/nix/profiles/default/share/wayland-sessions/hyprland.desktop /usr/share/wayland-sessions/hyprland.desktopso that the login manager can find Hyprland.
Upgrading / updating
In order to upgrade all your packages, you can run:
sudo nix profile upgrade --profile /nix/var/nix/profiles/default '.*'Check the nix profile command documentation for other upgrade options if that interests you.