hyprland-wiki/pages/Nix/_index.md
2024-06-19 18:51:14 +00:00

1.5 KiB

weight title
7 Nix

To install Hyprland on NixOS, we provide a NixOS and a Home Manager module.

{{< callout title=Note >}}

  • (Required) NixOS Module: enables critical components needed to run Hyprland properly
  • (Optional) Home-manager module: lets you configure Hyprland declaratively through home-manager.
    • Note that this does not install Hyprland; since it would require system-level changes such as adding a session file for your display manager. This is handled by the NixOS module once you enable it.

{{< /callout >}}

NixOS module

The module is now upstreamed into Nixpkgs, which means all you need in your configuration is:

{config, pkgs, ...}: {
  programs.hyprland.enable = true;
  # Optional, hint electron apps to use wayland:
  # environment.sessionVariables.NIXOS_OZONE_WL = "1";
}

Note that the command to run hyprland is Hyprland (with a capital H) and not hyprland.

For more options, see module options.

For other NixOS options, see Hyprland on NixOS.

Home-manager module

Read Hyprland on Home Manager.

For the adventurous, @spikespaz has made a Hyprland module that can be used in Home Manager and NixOS. It can be found here.

Options and overrides

Read Options & Overrides.