2024-02-20 21:16:07 +01:00
---
weight: 7
title: Nix
---
2023-07-17 18:14:43 +02:00
To install Hyprland on NixOS, we provide a NixOS and a Home Manager module.
2023-02-14 14:30:40 +01:00
2024-02-20 21:16:07 +01:00
{{< callout title = Note > }}
2023-12-14 19:02:45 +01:00
2024-06-19 20:51:14 +02:00
- _**(Required)** NixOS Module_: enables critical components needed to run Hyprland
2023-12-14 19:02:45 +01:00
properly
2024-06-19 20:51:14 +02:00
- _(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._
2024-02-20 21:16:07 +01:00
{{< / callout > }}
2023-02-14 14:30:40 +01:00
2023-07-17 18:14:43 +02:00
## NixOS module
2022-12-18 14:20:19 +01:00
2023-12-14 19:02:45 +01:00
The module is now upstreamed into Nixpkgs, which means all you need in your
configuration is:
2022-08-12 20:46:36 +02:00
2023-07-17 18:14:43 +02:00
```nix
{config, pkgs, ...}: {
programs.hyprland.enable = true;
# Optional, hint electron apps to use wayland:
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
}
```
2023-02-14 14:30:40 +01:00
2023-12-14 19:02:45 +01:00
Note that the command to run hyprland is `Hyprland` (with a capital `H` ) and not
`hyprland` .
2023-08-25 18:14:29 +02:00
2023-07-17 18:14:43 +02:00
For more options, see
[module options ](https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=hyprland ).
2023-02-14 14:30:40 +01:00
2024-03-17 13:44:39 +01:00
For other NixOS options, see [Hyprland on NixOS ](./Hyprland-on-NixOS ).
2022-09-09 16:53:49 +02:00
2023-07-17 18:14:43 +02:00
## Home-manager module
2022-12-09 13:38:13 +01:00
2024-03-17 13:44:39 +01:00
Read [Hyprland on Home Manager ](./Hyprland-on-Home-Manager ).
2023-11-27 12:36:33 +01:00
2023-12-14 19:02:45 +01:00
For the adventurous, [@spikespaz ](https://github.com/spikespaz ) has made a
Hyprland module that can be used in Home Manager and NixOS. It can be found
[here ](https://github.com/spikespaz/hyprland-nix ).
2023-11-27 12:36:33 +01:00
## Options and overrides
2024-03-17 13:44:39 +01:00
Read [Options & Overrides ](./Options-Overrides ).