The NixOS module enables critical components needed to run Hyprland properly,
such as: polkit,
xdg-desktop-portal-hyprland,
graphics drivers, fonts, dconf, xwayland, and adding a proper Desktop Entry to
your Display Manager.
Make sure to check out the options of the
NixOS module.
(Required) NixOS Module: enables critical components needed to run Hyprland
properly
(Optional) Home-manager module: lets you declaratively configure Hyprland
This will use the Hyprland version that Nixpkgs has.
Please enable Cachix before using the flake package, so you don’t
have to compile Hyprland yourself.
In case you want to use the development version of Hyprland, you can add it like
this:
# flake.nix{inputs.hyprland.url="github:hyprwm/Hyprland";# ...outputs={nixpkgs,...}@inputs:{nixosConfigurations.HOSTNAME=nixpkgs.lib.nixosSystem{specialArgs={inheritinputs;};# this is the important partmodules=[./configuration.nix];};}}# configuration.nix{inputs,pkgs,...}:{programs.hyprland={enable=true;package=inputs.hyprland.packages.${pkgs.system}.hyprland;};}
Don’t forget to change the HOSTNAME to your actual hostname!
Please enable Cachix before using the flake package, so you don’t
have to compile Hyprland yourself.